Jump to content

ASCII string to sc_bv and vice versa


sosarkar

Recommended Posts

Hello,

 

I am somewhat new to SystemC and I am interested in converting ASCII string to sc_bv and vice versa.

I tried static casting the string without success.

 

 

I am trying with stringstream; first convert the string to a stream and then stream into sc_bv.

 

Any comments and suggestions are welcome. Thanks for your kind attention.

 

~S 

 

Link to comment
Share on other sites

Hello,

 

I am somewhat new to SystemC and I am interested in converting ASCII string to sc_bv and vice versa.

I tried static casting the string without success.

 

 

I am trying with stringstream; first convert the string to a stream and then stream into sc_bv.

 

Any comments and suggestions are welcome. Thanks for your kind attention.

 

~S 

Hello Sir.

Please note that whenever you use casting, you are trying to force

the compiler to do something that it normally would not do, and so

create irritating side-effects. This especially true in a complicated

simulation involving large number of interacting modules. The best

option is to use string literals.

 

This is especially true if

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...