Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

look at my vhdl, why it doesn't work after synthesis

Status
Not open for further replies.

paradbird

Newbie level 2
Joined
Apr 10, 2003
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
35
I want to do asynchronism write, but this program can't work after synthesis, I don't know why. Please give me some advise. Thanks a lot.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity ioInput is
port(
D_out1 : out std_logic_vector(255 downto 0);
D_out2 : out std_logic_vector(127 downto 0);
cs : in std_logic;
wr : in std_logic;
addr : in std_logic_vector(3 downto 0);
D_in : in std_logic_vector(31 downto 0)
);
end ioInput;

architecture arch_ioInput of ioInput is

subtype SLV32 is std_logic_vector(31 downto 0);
type tmp_Data_in_type is array (11 downto 0) of SLV32;
signal tmp_Data_in : tmp_Data_in_type;

begin

process(cs,addr,wr,D_in)
begin
if cs = '0' and wr = '0' then
case addr is
when "0000" => tmp_Data_in(0) <= D_in;
when "0001" => tmp_Data_in(1) <= D_in;
when "0010" => tmp_Data_in(2) <= D_in;
when "0011" => tmp_Data_in(3) <= D_in;

when "0100" => tmp_Data_in(4) <= D_in;
when "0101" => tmp_Data_in(5) <= D_in;
when "0110" => tmp_Data_in(6) <= D_in;
when "0111" => tmp_Data_in(7) <= D_in;
when "1000" => tmp_Data_in(8) <= D_in;
when "1001" => tmp_Data_in(9) <= D_in;
when "1010" => tmp_Data_in(10) <= D_in;
when "1011" => tmp_Data_in(11) <= D_in;

when others => null;

end case;
end if;
end process;
D_out2 <= tmp_Data_in(3) & tmp_Data_in(2) & tmp_Data_in(1) & tmp_Data_in(0);
D_out1 <= tmp_Data_in(11) & tmp_Data_in(10) & tmp_Data_in(9) & tmp_Data_in(8) &
tmp_Data_in(7) & tmp_Data_in(6) & tmp_Data_in(5) & tmp_Data_in(4);

end arch_ioInput;
 

rntsay

Member level 4
Joined
Mar 29, 2002
Messages
73
Helped
14
Reputation
28
Reaction score
11
Trophy points
1,288
Activity points
484
code looks reasonable, maybe it's your synthesis tool. I know synplicity has trouble with "&" sometimes.
 

arena_yang

Member level 1
Joined
Apr 1, 2003
Messages
33
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
214
As I can see, the total number of the input and the output pins is very large. So If this module is used as a top level of a design ,pls check the max available io pins of the device you selected.If the max io number is less than the number you used here, it will not work correctly.

BTW, if there is a clock signal in your design, pls modify this module to synchronus design, otherwise, it will have a long logic trace delay! Keep in mind that VHDL is a HARDWARE language
 

rntsay

Member level 4
Joined
Mar 29, 2002
Messages
73
Helped
14
Reputation
28
Reaction score
11
Trophy points
1,288
Activity points
484
why would he want to add a clock to his design? (old synchronous design dogma!) he specifically says this is an asynch design...he's decoding/muxing which is fine the way he has it.
 

maestor

Full Member level 3
Joined
Feb 21, 2002
Messages
163
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Location
España
Activity points
1,888
Hi,

Do you get any warnings, errors after synthesis?
What synthesis tool are you using?
What device/technology are you targeting?

About the clock, I think you can not guarantee that your outputs are going to be estable, all of them, at the same time, altough I see that you are only changing 32 bits per write. And, of course, depends of the downstream device which is sampling them, and also depends of how fast you toggle your inputs.
With a clock is EASIER to perform a timing analisys and constraint your design but if you don't want to use a clock you'll have your reasons.

As arena_yang said if this module is used at top level you need a device with a number of user IO pins > 422.

Regards,
-Maestor
 

homeadd

Junior Member level 2
Joined
Dec 28, 2001
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
121
Whether the actual input "D_in" in you design satisfy with the setup time?In general,the data will be latch into register at the rising edge of wr.
 

maniasonic

Member level 1
Joined
Jan 8, 2004
Messages
34
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
238
please check your synthesis constraint script first. because if you make wrong constraints, the synthesizer will produce false result.

always remember, it's the designer, not synthesizer, who is responsable of the correctness of the design.
 

honey

Junior Member level 3
Joined
Jan 8, 2004
Messages
31
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
202
please check your synthesis constraint script first. because if you make wrong constraints, the synthesizer will produce false result.

always remember, it's the designer, not synthesizer, who is responsable of the correctness of the design.great
 

Al Farouk

Full Member level 4
Joined
Jan 13, 2003
Messages
191
Helped
16
Reputation
32
Reaction score
16
Trophy points
1,298
Location
Egypt
Activity points
1,854
The VHDL construction seems to be correct. if you mean that the design dos not work in real world be carefull to to check the control signal supplied to your design (CS, WR, address, data) it should be clean signals as your design is compinational any change (nois) in any signal will change the output. to check wether the error due to design or due to the signal supplied add an input (manual clock) that the operation of the design is done with this input change and check the expected output with each edge if it wirk correct, then the error due to the signal supplied otherwise du to design error
 

elektrom

Full Member level 2
Joined
Jul 2, 2001
Messages
127
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Activity points
965
Another way to write is to using rising edge of WR signal. Like this...

process(wr)
begin

if wr'event and wr = '1' then
if cs = '0' then
case addr is
...............

This style is suitable for FPGA architecture.
 

r_e_m_y

Member level 4
Joined
Oct 2, 2003
Messages
77
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
935
hi,

I agree with elektrom. You must add a clock signal if you want to memorize some data in registers. The synthesizer will do it with the signal='1' and signal'event code. If not, the synthesizer will never latch your data... it will only make logic.

:)
 

shawndaking

Full Member level 3
Joined
Jun 20, 2001
Messages
187
Helped
12
Reputation
24
Reaction score
6
Trophy points
1,298
Activity points
1,077
I Think This Is Too Ambigous Code Tring to Mux 32 bit to So Many latches. Mabee You Need To Implement It On Large FPGA (VIRTEX2)
Or In A Different Way !
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top