Aug 11, 2008 #1 S santumevce1412 Junior Member level 2 Joined Jan 8, 2008 Messages 24 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,445 design the circuit that produces the attached output. whenever an i/p is detected at an edge of a clock, the o/p is to be one for that clock cycle and after that o/p is to be zero for any i/p in the remaining cycles. pls find the diagram attached.
design the circuit that produces the attached output. whenever an i/p is detected at an edge of a clock, the o/p is to be one for that clock cycle and after that o/p is to be zero for any i/p in the remaining cycles. pls find the diagram attached.
Aug 12, 2008 #2 N natg9 Member level 3 Joined Jul 17, 2008 Messages 56 Helped 7 Reputation 14 Reaction score 0 Trophy points 1,286 Activity points 1,588 use FSM u ll be able to do it easily
Aug 12, 2008 #3 A apallix Junior Member level 1 Joined Aug 7, 2008 Messages 18 Helped 4 Reputation 8 Reaction score 2 Trophy points 1,283 Activity points 1,432 ---------------- assign int=input|output always @(posedge clk) output<=int --------------------- syntax is not accurate... but logic should be correct. assuming that output is initialized to '0' Added after 6 minutes: sorry... earlier solution is wrong... the following should work... assumes all flops initialized to zero . -------------------------- assign int_a=input|int_b; always @(posedge clk) begin int_b<=int_a; int_c<=int_b; end assign output=(~int_c)&int_b; ---------------------
---------------- assign int=input|output always @(posedge clk) output<=int --------------------- syntax is not accurate... but logic should be correct. assuming that output is initialized to '0' Added after 6 minutes: sorry... earlier solution is wrong... the following should work... assumes all flops initialized to zero . -------------------------- assign int_a=input|int_b; always @(posedge clk) begin int_b<=int_a; int_c<=int_b; end assign output=(~int_c)&int_b; ---------------------
Aug 13, 2008 #4 S santumevce1412 Junior Member level 2 Joined Jan 8, 2008 Messages 24 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,445 the above verilog code is working thank u for u r help i have asked one more question pls check u r inbox
the above verilog code is working thank u for u r help i have asked one more question pls check u r inbox