UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
132 Views
Registered: ‎09-22-2018

how to partition 2K data in two 1K data

hi 

Please can you any one tell me how will divide 2k  memory in 1k and 1k.

actully iam taking 4k data of text file, in that 4k data is avaible but for that im taking 2k data and storing in the memory location. 

with reg[15:0]mem[2047:0].

initial
begin
$readmemh("F:\\read\\Real.txt",mem);
end

integer i;
always @(posedge clk)
begin

if(i<1023)

i=i+1;

end

assign out=mem[i];

 

 

now the 2k data is stored in out.

how i will store that 2k data in 1k and 1k.

 

 

0 Kudos
2 Replies
Highlighted
Voyager
Voyager
121 Views
Registered: ‎02-01-2013

Re: how to partition 2K data in two 1K data

 

What is this, someone's homework problem....?

You didn't mention the required organization of the smaller memories. You're not going to get full credit unless you get that part right...

-Joe G.

 

0 Kudos
Explorer
Explorer
109 Views
Registered: ‎07-18-2018

Re: how to partition 2K data in two 1K data

This question isn't very clear. If you want to store it in two sets of 1K Rams, you would need to define two RAMs and then assign half the data in to one, and the other half to the other.

But how to code this, you should launch Vivado, go to IP catalog, and look up the example for a simple Dual Port Ram

You can then basically follow that template and create two of them and you will end up with two RAMs. (Though they might be combined in synth)

 

0 Kudos