Forum Discussion
Altera_Forum
Honored Contributor
16 years ago128 bit Avalon read/write
Hi, I am working on a class project that uses NIOS II to send 128 bit of data through Avalon bus to a custom logic to process and send back the data through Avalon to NIOS to display. I h...
Altera_Forum
Honored Contributor
16 years agoAs I mentioned before, another way to do it would be to assign a different address to each 32 bit word. For example, you could do something like:
always @(posedge clk) begin
if(avs_s0_write) begin
case(avs_s0_address)
2'd0: fifo_in <= avs_s0_writedata;
2'd1: fifo_in <= avs_s0_writedata;
2'd2: fifo_in <= avs_s0_writedata;
2'd3: fifo_in <= avs_s0_writedata;
endcase
end
endThen, to write the 128 bits you would do something like:
IOWR(ADD_INTERFACE_0_BASE,0,a);
IOWR(ADD_INTERFACE_0_BASE,1,b);
IOWR(ADD_INTERFACE_0_BASE,2,c);
IOWR(ADD_INTERFACE_0_BASE,3,d);