Roman Popov Posted April 10, 2016 Report Posted April 10, 2016 It seems like it makes sense to merge sc_*int and sc_big*int types. Wide buses are all around in modern systems. For example 64 bytes is common size of cache line. I do not see a good reason to keep two types for representing types with user-defined size. For example in Verilog I have single common type for all cases: bit [31:0] address; bit [511:0] data; But in SystemC I will have to use different types: sc_uint<32> address; sc_biguint<512> data; Specializing sc_uint depending on size will not break compatibility with existing Systemc 2.3 code . constexpr bool is_biguint(unsigned x) { return x > 64; } template<int n, bool isbig = is_biguint(n)> struct sc_uint {}; template<int n> struct sc_uint <n, true>: public sc_unsigned { }; template<int n> struct sc_uint <n, false>: public sc_uint_base { }; maehne 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.