Project

General

Profile

[logo] 
 
Home
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

Newbie question: __DOT__ defines not in the .h file

Added by Warren Toomey over 2 years ago

Hi all, I'm working through some of the ZipCPU blog entries where Dan mentions the _DOT defines in the obj_dir/*.h file. However, I don't have any _DOT anythings in my .h file. Can someone hit me with a cluebat!

In my top-level .v file, I have:

module zipcpu (
  input             i_clk,
  input             i_reset
  );

  // Wires connecting the fetch stage and memory
  wire [31:0] fetch_memaddr;
  wire fetch_memstrobe;
  wire fetch_memvalid;
  wire [31:0] fetch_memdata; ...

I'd like to be able to printf the inputs and the wires (and regs of course) at least at this top-level and possibly the lower modules.

My Makefile has these main commands:

verilator -LDFLAGS -lncurses -Wall --cc zipcpu.v --exe sim_main.cpp
make -C obj_dir -j -f Vzipcpu.mk Vzipcpu

In my sim_main.cpp, I can happily write to i_clk and i_reset.

Many thanks in advance for any suggestions, or let me know if I still need to supply some information to help diagnose my lack of knowledge.

Cheers, Warren


Replies (2)

RE: Newbie question: __DOT__ defines not in the .h file - Added by Warren Toomey over 2 years ago

OK, I think I'm getting closer. My project is right at the initial stages, so I think that Verilator is optimising away everything which isn't being used. I've now got some code that actually does something (for some definition of "something"), and now I see a few DOT things in my obj_dir/*.h.

I'll keep plugging away, and hopefully as I add functionality all the other wires and regs will turn up!

Cheers, Warren

RE: Newbie question: __DOT__ defines not in the .h file - Added by Wilson Snyder over 2 years ago

Correct, anything not used in verilog, or marked public, is likely to be optimized away for speed reasons.

    (1-2/2)