Discussion_02

Discussion_02 - How to read an i/p file? `timescale...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
How to read an i/p file? `timescale 1ns/10ps module tb; //declare input //declare output integer index reg [w-1:0] ippattern [0:L-1]; //instantiate DUT initial begin $readmemh("pattern.data", ippattern); for(index=0;index<L;index=index+1) begin @(posedge clk); in =ippattern[index]; . .. . .. . . .. .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
How to write an o/p file? `timescale 1ns/10ps module tb; //declare input //declare output integer ofile; //instantiate DUT initial begin ofile = $fopen("design.out"); $timeformat (-9, 0, " ns ", 5); //input stimuli $ fclose(ofile);
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/22/2011 for the course EE 577 at USC.

Page1 / 5

Discussion_02 - How to read an i/p file? `timescale...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online