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.

how to dump vars in verilog file?

Status
Not open for further replies.

arsenal

Full Member level 2
Joined
Oct 17, 2004
Messages
143
Helped
15
Reputation
30
Reaction score
4
Trophy points
1,298
Activity points
1,103
i wanna dump the signals in verilog simulation to a vector file that can be used in hsim simulation(by .vec <vector file>).
i have tried $dumpvars,but the output pattern cannot be recognized by hsim.

can anybody give me some help?
thx a lot
 

That is to say, your output file format is not fit for HSIM request, I recommend you use perl to do the format conversion. After all, they are both pure text file
 

if i'm not wrong, $dumpvars is dumping for VCD format.
 

/* here is an example...
say following are the signal i wish to put in .vec file
input clk pd_out[1:0] phdir phwt_0 phwt_14
output phsel_up phsel_dn phwt_up phwt_dn toggle_dir

*/

Code:
module vec_gen();
   integer file_ptr;
   initial begin
      file_ptr = $fopen("sim.vec");
      $fdisplay(file_ptr, "signal clk pd_out[1:0] phdir phwt_0 phwt_14");
      $fdisplay(file_ptr, "+ phsel_up phsel_dn phwt_up phwt_dn toggle_dir");
      $fdisplay(file_ptr, "period 10");
      $fdisplay(file_ptr, "radix 111111 11111");
      $fdisplay(file_ptr, "io    iiiiii ooooo");
      $fmonitor(file_ptr, "\t%b%b%b%b%b %b%b%b%b%b",clk, pd_out[1:0], phdir, phwt_0, phwt_14, 
                phsel_up phsel_dn phwt_up phwt_dn toggle_dir);
   end
endmodule // vec_gen
 

    arsenal

    Points: 2
    Helpful Answer Positive Rating
hi nand_gates,
thank you very much
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top