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.

[SOLVED] Problem with long array synthesis with implemented buffers

Status
Not open for further replies.

am85

Member level 2
Joined
May 30, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany
Activity points
1,661
Hi,
I am trying to implement a buffer to store 512 bytes before writing this block to an external memory. I tried implementing it in the following 2 ways:

type buffer is array(511 downto 0) of std_logic_vector (7 downto 0);
OR
signal buffer : STD_LOGIC_VECTOR (4096 DOWNTO 0);

and in both cases the synthesis takes so long. So should it be taking that long due to the big size of the buffer or there is a more efficient way to do it. Is there a specific way I should use to write to this buffer to speed up synthesis time or this is irrelevant ?

Thanks a lot.
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,091
Helped
2,078
Reputation
4,175
Reaction score
2,036
Trophy points
1,393
Activity points
39,387
Re: Array synthesis time

with something that large, you should really look at creating a ram rather than an array of registers. Check out the coding guidelines for your particular manufacturer for infered ram.
 

std_match

Advanced Member level 4
Joined
Jul 9, 2010
Messages
1,215
Helped
451
Reputation
902
Reaction score
413
Trophy points
1,363
Location
Sweden
Activity points
9,420
"buffer" is a reserved word in VHDL, so you should change the name.

I agree with TrickyDicky, you should use a RAM block to store the data, if possible.
 

am85

Member level 2
Joined
May 30, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany
Activity points
1,661
Thanks for your suggestion. I have changed the implementation to infer RAM and now the synthesis is just a few minutes. However, I checked the synthesis report and it is still not implemented as an inferred RAM but as 512 8-bit registers. The problem is that I would like to write to the buffer 3 bytes in one clock cycle, because the value i want to store is 24 bits. So i use three addresses then the implementation is registers and not RAM of course. The question is would it make a difference in resources utilization or performance if it is implemented as registers or RAM ?
Thanks.
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,091
Helped
2,078
Reputation
4,175
Reaction score
2,036
Trophy points
1,393
Activity points
39,387
with registers, you use register resource, with ram you use ram resource. A ram implemented in registers will take a large % of registers.
I suggest instead of providing 3 simultanous addresses, you provide 1 address and a 24 bit data word, then it should infer a ram.
 

am85

Member level 2
Joined
May 30, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany
Activity points
1,661
you are right but I am writing to an SD card and therefore i need to write one byte at a time and not 24 bits,but my values are 24 bits, so I need the buffer to be the same as the SD card (512 x 8 bits)to be able to write easily, that's why I write 3 bytes.
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,091
Helped
2,078
Reputation
4,175
Reaction score
2,036
Trophy points
1,393
Activity points
39,387
A Ram in this situation is much more appropriate.
I suggest you work out a method to get the words written in as 24 bits, and read out 8 bits at a time. Usually you can just enable the read every 3 clock and mux the data.
 
  • Like
Reactions: am85

    am85

    Points: 2
    Helpful Answer Positive Rating

am85

Member level 2
Joined
May 30, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany
Activity points
1,661
I will try that then . Thanks a lot for your help.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
49,159
Helped
14,391
Reputation
29,046
Reaction score
13,143
Trophy points
1,393
Location
Bochum, Germany
Activity points
283,318
There are various ways to implement block RAM with different port widths for read and write.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top