Zdenek Prikryl Posted April 28, 2017 Report Share Posted April 28, 2017 Hello, I'm trying to develop a memory that supports custom bytes/words. In the usual case, the byte is 8bit and word has 4 bytes (assuming 32bit data-path). Now, in embedded, it's possible that the byte is 12bit and word has 2 bytes (24bit data-path). For 12/24 integers, I can use sc_uint<12> or sc_uint<24>. So, my question is: Is there any helper function that stores/loads a custom int into the generic payload? If not, are there any rules to follow? Thanks. Quote Link to comment Share on other sites More sharing options...
apfitch Posted May 11, 2017 Report Share Posted May 11, 2017 Hi Zdenek, the template parameter to the various sockets represents the width of the bus, so you could change that to 12 from the default of 32. However the existing code does generally assume that 1 byte = 8 bits (e.g. the byte enables work with words split into 8 bit bytes). So you'd probably have to write some custom code, Alan Quote Link to comment Share on other sites More sharing options...
Zdenek Prikryl Posted May 11, 2017 Author Report Share Posted May 11, 2017 Hi Alan, This is what I thought. Well, let's do some custom coding then :-).... Thanks. Quote Link to comment Share on other sites More sharing options...
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.