Forum Discussion
Altera_Forum
Honored Contributor
12 years agoShare variables between verilog file and niosII application file(.c file)
Hello, I am trying to do a small concept where in I have created a project on DE2-115 board. In the same project, I have also implemented niosII processor and written a simple program to toggle th...
Altera_Forum
Honored Contributor
12 years agoThat's only a template and 16 regs are defined as typical example.
You could even have defined a single register or, on the other hand, extend the address range to whatever you need. In a generic case where you have: reg [31:0] ram[DEPTH-1:0]; You access from Avalon MM slde something like this:
always @(posedge clk) begin
if(slave_write)
ram <= slave_writedata;
else if (slave_read)
slave_readdata <= ram;
end