Documente Academic
Documente Profesional
Documente Cultură
use
single address for multiple data hence the throughput will incresease by 50% as in the case of AXI
stream firstly first data will come then second but in case of second AXI memory mapped the output
will come one after other there will be burst of output.
Ans 3) 1.
module top_seq(
input clk,
);
reg[3:0] present_state=4'b1110,next_state;
begin
if(clear==1)
begin
clear<=1'b0;
end
else
end
always @(present_state)
begin
next_state<=present_state;
if(present_state == s0)// ssiging nex_state to different state on the basis of present state
next_state<=s1;
else if(present_state==s1)
next_state<=s2;
else if(present_state==s2)
next_state<=s7;
else if(present_state==s7)
next_state<=s3;
else if(present_state==s3)
next_state<=s4;
else if(present_state==s4)
next_state<=s5;
else if(present_state==s5)
next_state<=s6;
else
clear = 1'b1;
end
endmodule
I have made this using a fsm mealy machine and taken the states as the 14,12,10,8,6,4,2,0 and
changing the state with each clk posedge and as it return at last it will return to s0 as I have taken
a clear operation there.
module top_seq(
input clk,
);
reg[2:0] present_state=3'b001,next_state;
begin
if(clear==1)
begin
clear<=1'b0;
end
else
end
always @(present_state)
begin
next_state<=present_state;
if(present_state == s0)// assiging next_state to different state on the basis of present state
next_state<=s1;
else if(present_state==s1)
next_state<=s2;
else
clear = 1'b1;
end
endmodule
I have made this using a fsm mealy machine and taken the states as the 1,2,7 and changing the
state with each clk posedge and as it return at last it will return to s0 as I have taken a clear
operation there.
Ans 5 : Logical Operators : works on Boolean statement and return a Boolean output.
Example :
a=4’b0000;
b=4’b0001