D
danmc91
Guest
Hello,
I'm trying to do some verilog sims of a circuit where the source is
schematics. I have a verilog netlister which will netlist out the
design down to calling primitives from a standard cell library. I
have a library.v file with verilog modules for all of the standard
cells (logic gates, flip-flops, etc).
The problem I'm having is how to deal with simple things like a
flip-flop configured as a divide by 2. The actual flip-flop does not
have a reset pin and so when the simulation starts, the output of the
flip-flop is an 'x' (as it should be) but of course it never resolves
because its output just feeds back to its input via an inverter. In
the real hardware, I could care less which state the thing starts in.
To make matters worse, there are actually quite a number of circuits
which are similar to this divide by 2. In other words they are
circuits with flip-flops which
a) don't have reset pins
b) don't care at all what state the thing comes up in because some
number of clock cycles later, all previous state has been flushed.
So my question, is if there is a way to tell verilog-XL for example to
initialize all registers which are an 'x' to 0 (or 1, I don't really
care) without having to explicitly list each and every one of them?
I don't really have the option of getting the library.v file modified
to put initial blocks inside of all flip-flops and latches that don't
have reset pins.
Thanks
-Dan
I'm trying to do some verilog sims of a circuit where the source is
schematics. I have a verilog netlister which will netlist out the
design down to calling primitives from a standard cell library. I
have a library.v file with verilog modules for all of the standard
cells (logic gates, flip-flops, etc).
The problem I'm having is how to deal with simple things like a
flip-flop configured as a divide by 2. The actual flip-flop does not
have a reset pin and so when the simulation starts, the output of the
flip-flop is an 'x' (as it should be) but of course it never resolves
because its output just feeds back to its input via an inverter. In
the real hardware, I could care less which state the thing starts in.
To make matters worse, there are actually quite a number of circuits
which are similar to this divide by 2. In other words they are
circuits with flip-flops which
a) don't have reset pins
b) don't care at all what state the thing comes up in because some
number of clock cycles later, all previous state has been flushed.
So my question, is if there is a way to tell verilog-XL for example to
initialize all registers which are an 'x' to 0 (or 1, I don't really
care) without having to explicitly list each and every one of them?
I don't really have the option of getting the library.v file modified
to put initial blocks inside of all flip-flops and latches that don't
have reset pins.
Thanks
-Dan