Altera_Forum
Honored Contributor
11 years agoAvalon MM: writedata and write
Hi, a beginner's question, when passing data from HPS to the FPGA I use the AVALON MM interface. Now I'm a bit in doubt, if it is better to check "write" and then fetch "writedata" into a reg (verilog), e.g.:
module something(
...
input write,
input writedata,
...
);
...
reg algo_in;
...
always @(posedge clk)begin
...
if(write)begin
algo_in <= writedata;
end
...
or if it is better to wire "writedata" directly, e.g.:
// module same as above
...
wire algo_in;
assign algo_in = writedata;
...
Do I actually need to check "write" for an avalon mapped slave interface, I saw that in tutorials it is done. But it seems to work using wires, too?!