I'm a bit confused what you're trying to do: are these internal signals in your FPGA, or are they driving off-chip...?
In your example, you can make 8 individual outputs glitch-free: simply register them using flipflops. But you can't guarantee they'll switch simultaneously (it's impossible to define, because it takes time to get from 0 to 1, and the wires will have tiny, different delays on them).
If it's for on-FPGA use, don't try to use them as clocks, but use them as enables. For instance:
- Code: Select all
always @(posedge clock) begin // generate enabling pulse every 8th cycle
counter <= counter + 1'b1;
t1 <= (counter == 3'b000);
end
always @(posedge clock) begin
if (t1) begin
foo <= bar; // foo gets updated after the cycle when t1 was high
something <= else + other;
// etc...
end
end
Just distribute the enable signal "t1", alongside "clock", to all the modules that need it. [Make sure the enable is registered, because that helps with fanout issues.]
FPGAs are intended for this sort of "synchronous" design. Trying to use them in other ways is a bit of a struggle!
Regards,
Nick