- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a set of test patterns in text file to be used in test bench written in verilog. test pattern will be sent to top module one by one for every posedge of clock once the ena is high.
Is there related function or syntax to implement the above task? Pls give some simple example. thanksLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Depends on your testpattern format. The easiest is to use $readmemh/b and read it into a Verilog memory. More fancier approach would be to use $fopen, $fscanf/$fgets etc.
A quick google search for $readmem would give you some syntax to start with. We cover this in good detail during our comprehensive functional verification course. Regards Srini cvcblr.com/blog- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. It helps

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page