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.

System Verilog Design a signal flag.

quocviet19501

Newbie level 6
Joined
Aug 21, 2023
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
97
Hi all, in my system verilog project. I am stuck because of a signal below
In this design, done_en is a flag that keeps tract of the generation of 2 bit data_fail. When the generation complete, the done signal asserts for 1 clk cycle to indicate data generation is finished. But I cannot find any way to control this signal like the above diagram.
Please if anyone provide any hint, I would really appreciate it.

1695114224435.png
 
Solution
Code:
if rising edge (clk) then
   done_en <= not empty;
   done <= done_en and empty;
end if;
respectively
Code:
always_ff@(posedge clk)
begin
   done_en <= !empty;
   done <= done_en & empty;
end
Hi,

as the picture shows:
doen_en is generated from empty
done_en is clocked by the rising edge of clk.

So my approah would be:
a simple DFF:
* CLK --> DFF_CLK
* empty --> inverted --> DFF_D
* DFF_Q --> done_en

Klaus
 
Hi,

as the picture shows:
doen_en is generated from empty
done_en is clocked by the rising edge of clk.

So my approah would be:
a simple DFF:
* CLK --> DFF_CLK
* empty --> inverted --> DFF_D
* DFF_Q --> done_en

Klaus
My question is how to design the signal "done" that asserts 1 clk cycle like the above picture. This is where I am stuck. But thank you very much for your reply.
 
in a clocked process:
done_en_d <= done_en;

combinatorial:
done <= done_en_d and not done_en;
 
Code:
if rising edge (clk) then
   done_en <= not empty;
   done <= done_en and empty;
end if;
respectively
Code:
always_ff@(posedge clk)
begin
   done_en <= !empty;
   done <= done_en & empty;
end
 
Solution

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top