Continue to Site

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.

synthesizing takes too long time

Status
Not open for further replies.

p11

Banned
Joined
Jan 25, 2014
Messages
177
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
0

Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date:    16:05:19 02/07/2017 
-- Design Name: 
-- Module Name:    vhdl_data - Behavioral 
-- Project Name: 
-- Target Devices: 
-- Tool versions: 
-- Description: 
--
-- Dependencies: 
--
-- Revision: 
-- Revision 0.01 - File Created
-- Additional Comments: 
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
 
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
 
entity vhdl_data is
 
 
port(
Clk : in std_logic; -- processing clock
we : in std_logic; -- write enable signal
 
data_out : out std_logic_vector(8 downto 0)
); -- output data from memory 
end vhdl_data;
 
architecture Behavioral of vhdl_data is
 
------------------------------------ RAM declaration
type memory1 is array (0 to 1999) of STD_LOGIC_VECTOR (8 DOWNTO 0);
signal  dat2 : memory1 :=(others => "000000000");
 
type memory2 is array (0 to 999) of STD_LOGIC_VECTOR (8 DOWNTO 0);
signal  dat : memory2 :=(others => "000000000");
-------------------------------------- Signal declaration
signal j : integer;
signal kout1 : integer:=1;
 
signal k2 : integer;
begin
 
process(Clk, we)
begin
if (rising_edge (clk)) then
if we = '1' then -- In this process writing the input data into ram
---
dat2 (kout1+conv_integer(dat2(kout1-1))) <= dat (j);
--
dat2 (kout1-1) <= dat2 (kout1-1)+1;
end if;
 
end if;
end process;
 
data_out <= dat2(k2); -- Reading the data from RAM
 
end Behavioral;




This code is taking too long time to synthesize ............. , i mean going on and on ... after 20 mins i stopped it forcefully , so really dont know whether finally it will synthesize or not ... whats the problem with this code ... any modification please .
 
Last edited by a moderator:

Yes, because you are building HUGE arrays of registers, and not memories, becuase your "memory" signals do not bahave like proper memories:

To make it infer a memory, you need to register the write data and read address. You cannot used the read data to immediatly write back to ram.

I suggest reading some code guidelines on how to infer a ram (or you may be better off just using coregen to create rams for you, and instantiating them yourself)
Here are the Vivado Coding Guidlines- ram is on page 96
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_1/ug901-vivado-synthesis.pdf

- - - Updated - - -

I also notice you have failed to provide the whole code. - please provide all of the code!
 

Yes, because you are building HUGE arrays of registers, and not memories, becuase your "memory" signals do not bahave like proper memories:

To make it infer a memory, you need to register the write data and read address. You cannot used the read data to immediatly write back to ram.

I suggest reading some code guidelines on how to infer a ram (or you may be better off just using coregen to create rams for you, and instantiating them yourself)
Here are the Vivado Coding Guidlines- ram is on page 96
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_1/ug901-vivado-synthesis.pdf

- - - Updated - - -

I also notice you have failed to provide the whole code. - please provide all of the code!






actually the entire code i have not written totally ... i found a memory write code in net and modified it by dat2 (kout1+conv_integer(dat2(kout1-1))) <= dat (j);
--
dat2 (kout1-1) <= dat2 (kout1-1)+1;..... the original code was at this link https://www.rfwireless-world.com/source-code/VHDL/read-write-RAM-vhdl-code.html... sir, will you please give me an idea about how to modify the code for avoiding arrays and infering ram. I dont want to use coregen , want to write the entire code by my own . please .
 

Until you understand digital logic, I suggest you use coregen for your rams. It will save you a lot of time.
 

ok, bt still sir , it would be highly helpful if you modify this code..
 

ok, bt still sir , it would be highly helpful if you modify this code..

That would be doing your work for you. Much better to learn for yourself....

- - - Updated - - -

Plus I told you what the problem with the code is in post #2
 

You are not trying to map this to FPGA resources. Xilinx devices mostly have 3 memory elements. BRAM are clocked for reads and clocked for writes. They offer either two reads, two writes, or one read and one write natively. DMEM are smaller. They allow non-clocked reads and clocked writes. They can have up to 3 reads and 1 write per cycle. Finally, there are registers. You can do many things here, but it uses a lot of area.

coregen doesn't seem viable by itself. You have dat2 with 2-3 async reads and 2 writes. dat has an async read.

You would need to have a dual-write DMEM. This is possible, but requires more effort.


The code in the linked website doesn't have multiple reads/writes and has both clocked read and write.

You should evaluate if you actually need multiple async reads and multiple writes per cycle. Perhaps you can do one read and one write per cycle if you break this operation up into multiple cycles.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top