Altera_Forum
Honored Contributor
18 years agoWhat should we expect to obtain from synthesis?
Hello, this topic is a Verilog beginner's cranky confusion.
I want to do a detector, which senses the status transition for several inputs. As an instance, an MCU system needs an interrupt to know the alarm status changes for temperature, voltage...., including both the alarm set up and clearance. As long as any single alarm status changes, the interrupt should be sent to MCU. To implement this function, I can design the internal structure with XOR gates and DFF. But I am lazy and have an assumption that synthesizer can do it for me, then I write down the codes like below: input a,b,c,d; output reg out; initial out=1'b0; always @ (a or b or c or d) out=1'b1; That is supposed if and only if "a or b or c or d" changes, then out is assigned with 1. But after synthesis, out pin is connected with 1 for ever. I have a question about it. How does systhesizer do this decision? In fact it meets the requirement that "if" input changes then out pin is 1, but it conflicts with "only if". What should I expect to obtain from systhesizer?