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.

specify in verilog not working in questasim

Status
Not open for further replies.

gck

Full Member level 3
Joined
Oct 17, 2006
Messages
173
Helped
26
Reputation
52
Reaction score
19
Trophy points
1,298
Activity points
2,220
Hi all,

I am trying to simulate the following program in questasim 6.5, for d ff model. I am getting setup and hold time violation but not the delay in output q.

Please suggest changes in code.

Thanks in advance

//D-FF model
module d_ff_model ( output reg q,
input d, clk, rst);

reg set_violation, hold_violation;

initial
$monitor("set_violation= %d , hold_violation=%d", set_violation , hold_violation);

always @(rst, posedge clk)
begin
if(rst)
q <= 'b0;
else
q <= d;
end

//Specify block for defining delays
specify
// propogation delay
// High to Low and Low to High
specparam t_h_l = 50, t_l_h = 15;
(posedge clk => (q:d) ) =(t_h_l, t_l_h);
(rst *> q) = (t_h_l, t_l_h);


//setup time 10 ns
specparam t_setup = 10;
$setup(d, posedge clk &&& (~rst), t_setup, set_violation ) ;

//Hold time 5 ns
specparam t_hold = 5;
$hold(posedge clk &&& (~rst), d, t_hold, hold_violation);

endspecify
endmodule // d_ff_model
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top