ETRX_13
Newbie level 6
- Joined
- Jan 22, 2013
- Messages
- 12
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,405
Well, why not past the errors, or what problems you're having.
Everything you can do with verilog you can do with VHDL for FPGA development. I think you either misunderstood these other people or they dont know what they are talking about. For a start, you can write state machines in VHDL.
And what about timing/gate delay, power consumption, area consumption
How to find these things are there any tools available in XILINX for the calculation of above parameters
or I have to do that another software. specially for accurate gate delay
Though the accuracy of said power consumption won't necessarily be very accurate unless you supply vectors from simulation so the tools know the exact toggle behavior of the registers.
You can also download the xpower spreadsheet from Xilinx that allows you to enter the estimated toggle frequencies of the registers/memory/IO/clocks/etc and the number of each. I've had some success using this tool for preliminary PS design. I normally set the spreadsheet to estimate the worst case power and I have yet to see a design require more current on the supply rails. Of course having good estimations of the number of regsiters/RAMs etc prior to designing said logic will help significantly in the quality of the estimate. Just remember to use 12.5% (default value?) for the toggle rate of FFs in the design. If you know some piece of logic has random data on it you can probably go higher.
Regards
When I am synthesizing my design the following error appears
"More actuals found than formals in portmap"
This error comes when you are doing mistake in port mapping.
Just check number of port defined in your instantiated design code and in port mapping. there must be mismatch.
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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 ---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 00:01:13 03/25/2014 -- Design Name: -- Module Name: Latch_RippleAdder - 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; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; --D Flip Flop entity D_ff is port( din : in STD_LOGIC; clk : in STD_LOGIC; reset : in STD_LOGIC; dout : out STD_LOGIC ); end D_ff; architecture Behavioral of D_ff is begin dff : process (din,clk,reset) is begin if (reset='1') then dout <= '0'; elsif (falling_edge (clk)) then dout <= din; end if; end process dff; end Behavioral; --Ripple Carry Adder library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity Ripple_Carry_Adder is port( A : in std_logic_vector( 3 downto 0); B : in std_logic_vector( 3 downto 0); C_in : in std_logic; S : out std_logic_vector( 3 downto 0); C_out : out std_logic); end Ripple_Carry_Adder; architecture Behavioral of Ripple_Carry_Adder is begin process(A, B, C_in) variable tempC: std_logic_vector( 4 downto 0 ); variable P : std_logic_vector( 3 downto 0 ); variable G : std_logic_vector( 3 downto 0 ); begin tempC(0) := C_in; for i in 0 to 3 loop P(i):= A(i) xor B(i); G(i):= A(i) and B(i); S(i)<= P(i) xor tempC(i); tempC(i+1):= G(i) or (tempC(i) and P(i)); end loop; C_out <= tempC(4); end process; end Behavioral; --Main Architecture library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- --entity Latch_Adder is --end Latch_Adder; -- --architecture Latch_Adder of Latch_Adder is entity Latch_RippleAdder is port( X : in std_logic_vector( 3 downto 0); Y : in std_logic_vector( 3 downto 0); Cy_in : in std_logic; RESET : in std_logic; CLK : in std_logic; Sum : out std_logic_vector( 3 downto 0); Cy_out : out std_logic); end Latch_RippleAdder; architecture Behavioral of Latch_RippleAdder is component D_ff is port( din : in STD_LOGIC; clk : in STD_LOGIC; reset : in STD_LOGIC; dout : out STD_LOGIC); end component; component Ripple_Carry_Adder is port( A : in std_logic_vector( 3 downto 0); B : in std_logic_vector( 3 downto 0); C_in : in std_logic; S : out std_logic_vector( 3 downto 0); C_out : out std_logic); end component; signal L: std_logic_vector(8 downto 0); begin D0: D_ff PORT MAP(X(0), CLK, RESET, L(0)); D1: D_ff PORT MAP(X(1), CLK, RESET, L(1)); D2: D_ff PORT MAP(X(2), CLK, RESET, L(2)); D3: D_ff PORT MAP(X(3), CLK, RESET, L(3)); D4: D_ff PORT MAP(Y(0), CLK, RESET, L(4)); D5: D_ff PORT MAP(Y(1), CLK, RESET, L(5)); D6: D_ff PORT MAP(Y(2), CLK, RESET, L(6)); D7: D_ff PORT MAP(Y(3), CLK, RESET, L(7)); D8: D_ff PORT MAP(Cy_in, CLK, RESET, L(8)); ADD: Ripple_Carry_Adder -- PORT MAP(L(0), L(4), L(1), L(5), L(2), L(6), L(3), L(7), L(8), -- Sum(0),Sum(1), Sum(2), Sum(3), Cy_out); PORT MAP(L(0), L(1), L(2), L(3), L(4), L(5), L(6), L(7), L(8), Sum(0),Sum(1), Sum(2), Sum(3), Cy_out); -- Sum(0) <= S(0); -- Sum(1) <= S(1); -- Sum(2) <= S(2); -- Sum(3) <= S(3); -- -- Cy_in <= C_in; -- Cy_out <= C_out; end Behavioral;
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 component Ripple_Carry_Adder is port( A : in std_logic_vector( 3 downto 0); B : in std_logic_vector( 3 downto 0); C_in : in std_logic; S : out std_logic_vector( 3 downto 0); C_out : out std_logic); end component; signal L: std_logic_vector(8 downto 0); ADD: Ripple_Carry_Adder PORT MAP(L(0), L(1), L(2), L(3), L(4), L(5), L(6), L(7), L(8), Sum(0),Sum(1), Sum(2), Sum(3), Cy_out);
Code VHDL - [expand] 1 2 3 4 5 6 7 ADD: Ripple_Carry_Adder PORT MAP ( A => L(0), B => L(1), C_in => L(2), S => L(3), C_out => L(4) );
Code VHDL - [expand] 1 2 3 4 5 6 7 ADD: Ripple_Carry_Adder PORT MAP ( A => (L(0) & L(1) & L(2) & L(3)), -- if you meant L(0) is the most significant bit of A(3 downto 0), otherwise use L(3 downto 0) B => (L(4) & L(5) & L(6) & L(7)), C_in => L(8), S => (Sum(0) & Sum(1) & Sum(2) & Sum(3)), C_out => Cy_out );
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?