Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

is internal memory allowed in FPGA

Status
Not open for further replies.

samuel_raja_77

Junior Member level 2
Joined
Apr 8, 2006
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,458
i need to have memory in my design is it possible to have internal memory of some 10K in fpga or we need to have only external memory ........i am using xilinx version 8.1i and the device i choose is virtex - II pro xc2vp7 which has the 11,088 logic cells
792 BRAM(Kbits) 44 (18X18) multiplier ...........help me with some suggestion
 

vahidkh6222

Full Member level 2
Joined
Oct 11, 2005
Messages
137
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,296
Activity points
2,419
yes i think u can use BRAMs(if they were sufficient for ur design). actually they ARE using for these purposes. you can even use them as some kind of ROM memory. if you initialize them with ur constant data.
 

samuel_raja_77

Junior Member level 2
Joined
Apr 8, 2006
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,458
1.Does these ROM and RAM need to be codded as a separate module .........i.e. if i have a RAM of 2K is it strict to be placed as a separate module or i can use them in my already existing module with another always block......
2.if i have a RAM within in the module as another always block how to access........it please help...me in fixing the design with some suggestions,................
 

deh_fuhrer

Full Member level 5
Joined
Jul 25, 2006
Messages
279
Helped
46
Reputation
92
Reaction score
18
Trophy points
1,298
Activity points
2,874
You can use in your module.
First declare a reg of required size.Then declare a pointer which can read or write the memory.When writing the memory increment the pointer on each clock edge.
e.g.

for writing
input in;
mem[0:1023];
always @(posedge clk)
begin
i=i+1;
mem=in;
end

for reading simply point as mem[34] or whatever location you want.
 

salma ali bakr

Advanced Member level 3
Joined
Jan 27, 2006
Messages
971
Helped
104
Reputation
206
Reaction score
21
Trophy points
1,298
Activity points
7,491
so, one can have memory initialized within the HDL design as an array
or use also separate memory provided in the development kit

correct me if i'm wrong please:)
 

Iouri

Advanced Member level 2
Joined
Aug 17, 2005
Messages
682
Helped
87
Reputation
174
Reaction score
8
Trophy points
1,298
Activity points
4,814
You can use BRAM or if you have extra LUTs in your design you can use as memory as well
 

darylz

Full Member level 2
Joined
Mar 24, 2005
Messages
129
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,298
Activity points
1,975
BRAM is available in fpga. but behavior level description will not work. pls refer to mannul
 

vahidkh6222

Full Member level 2
Joined
Oct 11, 2005
Messages
137
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,296
Activity points
2,419
you have the full optionality in this case.
you can make a seperate module as MY_RAM and define its behavior and access to its ports just like an external ram.
or u can define ram inside your design very simply. for example for a dual port BRAM we have:

process (<clock>)
begin
if (<clock>'event and <clock> = '1') then
if (<enableA> = '1') then
if (<write_enableA> = '1') then
<ram_name>(conv_integer(<addressA>)) <= <input_dataA>;
end if;
<ram_outputA> <= <ram_name>(conv_integer(<addressA>));
<ram_outputB> <= <ram_name>(conv_integer(<addressB>));
end if;
end if;
end process;


from this moment on, if u wanted to read smthing from specified address, you must adjust "addressA" with intrested adresa and then put '1' in "enableA" signal. the requested data is ready on "ram_outputA" on next clock edge. and if you want to write somthing provide the addreassA and input_dataA with intrested data and then put '1' on the "write_enableA" signal....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top