mirror of
https://github.com/verilator/verilator.git
synced 2025-01-05 22:27:35 +00:00
Fix missing too many digits warning, bug1380.
This commit is contained in:
parent
0198a2e9f3
commit
e8636f987f
2
Changes
2
Changes
@ -15,6 +15,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
|||||||
|
|
||||||
**** Fix error when no modules in $unit, bug1381. [Al Grant]
|
**** Fix error when no modules in $unit, bug1381. [Al Grant]
|
||||||
|
|
||||||
|
**** Fix missing too many digits warning, bug1380. [Jonathan Kimmitt]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 4.008 2018-12-01
|
* Verilator 4.008 2018-12-01
|
||||||
|
|
||||||
|
@ -177,10 +177,9 @@ V3Number::V3Number(FileLine* fileline, const char* sourcep) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Convert bin/octal number to hex
|
// Convert bin/octal number to hex
|
||||||
for (const char* cp=value_startp+strlen(value_startp)-1;
|
for (const char* cp=value_startp+strlen(value_startp)-1;
|
||||||
(cp>=value_startp
|
cp >= value_startp;
|
||||||
&& obit<=width());
|
cp--) {
|
||||||
cp--) {
|
|
||||||
if (*cp!='_' && *cp!='0' && obit>=width()) {
|
if (*cp!='_' && *cp!='0' && obit>=width()) {
|
||||||
m_fileline->v3error("Too many digits for "<<width()<<" bit number: "<<sourcep);
|
m_fileline->v3error("Too many digits for "<<width()<<" bit number: "<<sourcep);
|
||||||
break;
|
break;
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
%Error: t/t_const_overflow_bad.v:10: Too many digits for 8 bit number: 8'habc
|
%Error: t/t_const_overflow_bad.v:10: Too many digits for 8 bit number: 8'habc
|
||||||
%Error: t/t_const_overflow_bad.v:11: Too many digits for 6 bit number: 6'o1234
|
%Error: t/t_const_overflow_bad.v:11: Too many digits for 6 bit number: 6'o1234
|
||||||
%Error: t/t_const_overflow_bad.v:12: Too many digits for 3 bit number: 3'b1111
|
%Error: t/t_const_overflow_bad.v:12: Too many digits for 3 bit number: 3'b1111
|
||||||
|
%Error: t/t_const_overflow_bad.v:18: Too many digits for 129 bit number: 129'hdeadbeefc001f00ddeadbeefc001f00ddeadbeefc001f00ddeadbeefc001f00d
|
||||||
%Error: Exiting due to
|
%Error: Exiting due to
|
||||||
|
@ -14,4 +14,7 @@ module t (/*AUTOARG*/);
|
|||||||
// We'll allow this though; no reason to be cruel
|
// We'll allow this though; no reason to be cruel
|
||||||
parameter [200:0] OKH = 8'h000000001;
|
parameter [200:0] OKH = 8'h000000001;
|
||||||
|
|
||||||
|
// bug1380
|
||||||
|
parameter [128:0] ALSO_SMALL = 129'hdeadbeefc001f00ddeadbeefc001f00ddeadbeefc001f00ddeadbeefc001f00d;
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
Loading…
Reference in New Issue
Block a user