Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top