-
Notifications
You must be signed in to change notification settings - Fork 41
const parameter can not support sc_biguint #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, it is limitation described at SystemC supported: Potentially, it is possible to support >64 constants initialized with concatenation operator: const sc_uint<64> A = 0x8000000000000000;
const sc_uint<64> B = 0x8000000000000000;
const sc_biguint<128> C = (A, B); -- error reported now localparam logic[63:0] A = 64'h8000000000000000;
localparam logic[63:0] B = 64'h8000000000000000;
localparam logic[127:0] C = {A,B}; Will add this to future plans. Is that critical for your designs or it is just checking tool evaluation? |
Since current version SC type variable can be initialized with string literal or string variable which support >64 bit values. const char* cstr = "43";
std::string str; // Initialized in constructor or a method call
void someProc() {
sc_uint<16> ux = "0b110011"; // Initialization with string literal
ux = "42"; // String literal assignment
ux = cstr; // C string assignment
ux = str.c_str(); // std::string assignment
sc_biguint<65> bu;
bu = "0x1FFFF1111FFFF1111"; // More than 64bit literal
} |
Got it, thanks very much. |
When I use sc_biguint as type of one const member parameter, which data bits more than 64, will cause error.
One example, const sc_biguint<65> data;
error: Unsupported type: 'const sc_dt::sc_biguint<65>'
Is this a limitation of this tool?
Thanks very much.
The text was updated successfully, but these errors were encountered: