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.

VHDL synthesis errors.

Status
Not open for further replies.

munchies

Newbie level 3
Joined
Apr 8, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
I am attempting to create a simple block of hardware, that takes 3 inputs (a, b and c) and outputs a*b + c.

Assuming the inputs are all 8 bit, and the output will need to be 16 bit I have created this code.

Code:
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;

ENTITY IPCoreABplusC IS
  GENERIC (wordsize: NATURAL := 8);
  PORT (a, b, c : IN STD_LOGIC_VECTOR (wordsize - 1 DOWNTO 0);
    clk : in STD_LOGIC;
    clear : in STD_LOGIC;
    y : OUT STD_LOGIC_VECTOR (2 * wordsize - 1 DOWNTO 0)
  );
END IPCoreABplusC;


ARCHITECTURE rtl OF IPCoreABplusC IS
  SIGNAL a_int, b_int, c_int : STD_LOGIC_VECTOR (wordsize - 1 DOWNTO 0);
  SIGNAL c_int_input : STD_LOGIC_VECTOR (2 * wordsize - 1 DOWNTO 0);
  SIGNAL ab_product : unsigned (2 * wordsize - 1 DOWNTO 0);
  SIGNAL y_int : unsigned (2 * wordsize - 1 DOWNTO 0);
BEGIN
  PROCESS (clk, clear)
  BEGIN
    IF (clear = '1') THEN
      a_int <= (OTHERS => '0');
      b_int <= (OTHERS => '0');
      c_int <= (OTHERS => '0');
      c_int_input <= (OTHERS => '0');  
      ab_product <= (OTHERS => '0');
      y <= (OTHERS => '0');
      y_int <= (OTHERS => '0');
      
    ELSIF (clk'event AND clk = '1') THEN
      a_int <= a;
      b_int <= b;
      c_int <= c;
      c_int_input <= "00000000" & c_int;
      ab_product <= unsigned (a_int) * unsigned (b_int);
      y_int <= ( (unsigned (c_int_input))) + unsigned (ab_product);
    END IF;
  END PROCESS;

  y <= STD_LOGIC_VECTOR(y_int);
    
END rtl;

It compiles with no issues, however it gives errors when synthesizing:

Code:
All reachable assignments to c_int_input(8) assign '0', register removed by optimization
and the same error up to c_int_input(15)

Code:
Multiple non-tristate drivers for net y(15) in IPCoreABplusC
and the same error to y(0)

Code:
Unresolved tristate drivers for net y(0) in IPCoreABplusC
and the same error to y(15)


Can any of you help point me towards where the issue is? What have I done wrong and how can I solve this?

I am fairly inexperienced in this, so forgive me.
 

What are you using to compile?

First off, remove y from the clear section, because Y has no register (and you get multiple constant driver error).

When you've removed that, you get this:
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top