DS1701 Posted September 16, 2019 Report Share Posted September 16, 2019 Hi all, I dont know what is mean using Bus width when declare a socket. eg: model A has an initiator socket : tlm::tlm_initiator_socket<32,tlm::tlm_base_protocol_types,0> iSocket; //BUSWIDTH = 32 model B has a target socket : tlm::tlm_target_socket<32,tlm::tlm_base_protocol_types,0> tSocket; //BUSWIDTH = 32 iSocket will bind with tSocket. when I issue a transaction from model A to model B with trans.set_data_length(128); // 128 > BUSWIDTH I received 128 byte data, What is mean BUSWIDTH when I declare a socket? Quote Link to comment Share on other sites More sharing options...
Eyck Posted September 17, 2019 Report Share Posted September 17, 2019 Well, as the name says it is the data transfer with of the bus you are using. So in your case sending 128byte of data across bus having 32bits means you model a burst access having 32beats. Having said this you should notice that the bus width determines mainly the timing of a transaction. Unless you use timing for your transaction and rely on it (e.g. for performance modeling) it should not bother you. Best regrads Quote Link to comment Share on other sites More sharing options...
DS1701 Posted September 17, 2019 Author Report Share Posted September 17, 2019 In my case: I bind directly initiator and target iSocket(tSocket); when target receive transaction, it will copy data to payload unsigned char data[1024]; for (unsigned int i = 0; i < NUM_MAX; i++) { data[i] = i ; } memcpy(trans.get_data_ptr(), &data, length); with length = 128, Initiator read 128 byte from "trans", and I get 0, 1, 2, 3, 4,...127 I think if BUSWIDTH = 32 then I only get 0 ,1 ,2, 3, 0, 0, 0, 0.... It is mean, Initiator can get 128 bytes, in spite of BUSWIDTH= 32, So, I'm not clarify about BUSWIDTH Quote Link to comment Share on other sites More sharing options...
Eyck Posted September 17, 2019 Report Share Posted September 17, 2019 Again, in your case you model a burst read which means in reality data gets transfered in several beats (32 in your case). Since your model does not deal with timing you wont notice that, all you see is that your data gets transfered. Look, TLM2.0 implements a generic bus protocol. Most of the real-world protocols have a so called burst transfer (e.g. checkout the AMBA specs). So the way to model this in an abstract way is to have a bust with and the amount of bytes being transfered in on bus transaction not in one beat. This way it is also possible to describe byte and half-word transfers. HTH DS1701 1 Quote Link to comment Share on other sites More sharing options...
DS1701 Posted September 17, 2019 Author Report Share Posted September 17, 2019 Thank @Eyck 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.