Load String in a memory ( verilog )

Status
Not open for further replies.

afro_cv

Newbie level 1
Joined
Oct 18, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Portugal
Activity points
1,288
Before i tell my problem, sorry for my english..i don't speak very well.
i creat a memory rom

reg [7:0] rom[255];

I know it's only one character

Now i must put strings in memory, something like that (i know that doesn''t possible)

rom[0:7]="Helder_7";
rom[8:15]="Iloveyou"

The rest it's for future expansive (it's a example)

how i can make that in verilog, i try that in modelsim...but don't work.

I am thinking doing a program in C, read the strings to introduce in ROM and create a file to $readmemh.
 

What you need to do is to convert your string to it's ASCII presentation, then assign each element of you memory with those values.

Best regards,
/Farhad
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…