T
TJ Edmister
Guest
Even though you can't use a wire the same way you can use a reg (ie.
inside an always or conditional block), can't a reg end up behaving just
like a wire if you put it in an always @(*) block? By that I mean, it
changes asynchronously depending only on its inputs? For instance, these
examples:
// program 1
wire [3:0] news = friday ? goodnews : badnews;
// program 2
reg [3:0] news;
always @(*) begin
if (friday) news <= goodnews;
else news <= badnews;
end
Any difference in how these would synthesize?
inside an always or conditional block), can't a reg end up behaving just
like a wire if you put it in an always @(*) block? By that I mean, it
changes asynchronously depending only on its inputs? For instance, these
examples:
// program 1
wire [3:0] news = friday ? goodnews : badnews;
// program 2
reg [3:0] news;
always @(*) begin
if (friday) news <= goodnews;
else news <= badnews;
end
Any difference in how these would synthesize?