mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
Convert $monitor to use string based formatting.
This completes the transition to the new string based formatting. All the tasks now use the string formatting routines. Better compile time checking and better messages were also added. Also a couple of types were added to vpi_get_str(vpiType, ...) and the calculation for vpiConstantSelect was fixed for both the &A<> and &PV<> constructs. If the value is a plain variable or if it is calculated in thread space we assume it is not a constant. This may not be true because of limitations/bugs in the compiler (constant user functions are one known problem).
This commit is contained in:
+6
-3
@@ -640,10 +640,13 @@ static int vpi_array_vthr_A_get(int code, vpiHandle ref)
|
||||
case vpiAutomatic:
|
||||
return (int) parent->scope->is_automatic;
|
||||
|
||||
// For now &A<> is only a constant select. This will need
|
||||
// to be changed when it supports variable selection.
|
||||
// If address_handle is not zero we definitely have a
|
||||
// variable. If the wid is not zero we have a calculation
|
||||
// from thread space which probably includes a variable.
|
||||
// This assumes that the compiler is squashing all the
|
||||
// constant expressions down to a single value.
|
||||
case vpiConstantSelect:
|
||||
return 1;
|
||||
return obj->address_handle == 0 && obj->wid == 0;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user