Jump to content

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×