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.

[SOLVED] adder in ise12.1 shematic

Status
Not open for further replies.

maia31

Member level 1
Joined
Jul 10, 2011
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
earth
Activity points
1,519
how can i use 24 bit adder with enable pin in ise 12.1?
 

cant you write a vhdl or verilog code for the same??
 

adder in ise12.1 shematic
how can i use 24 bit adder with enable pin in ise 12.1?
VHDL or VERILOG?
See some examples in language templates
in ISE EDIT--> language templates
In that VHDL or VERILOG-->Synthesis constructs--> Coding examples --> ARithmetic --> Add/Sub




or you are talking about Schematic's in ISE??
 
Last edited:

i can
but i want in schematic form not vhdl form
and this is part of a bigger project
and ise schematic have 16 bit adder
but not 24 bit
and all of them don't have enable pin

---------- Post added at 08:33 ---------- Previous post was at 08:31 ----------

cant you write a vhdl or verilog code for the same??

i can
but i want in schematic form not vhdl form
and this is part of a bigger project
and ise schematic have 16 bit adder
but not 24 bit
and all of them don't have enable pin

---------- Post added at 08:34 ---------- Previous post was at 08:33 ----------

VHDL or VERILOG?
See some examples in language templates
in ISE EDIT--> language templates
In that VHDL or VERILOG-->Synthesis constructs--> Coding examples --> ARithmetic --> Add/Sub




or you are talking about Schematic's in ISE??

well im talk about Schematic's in ISE
and by the way may language is vhdl
 

is very difficalt? if en = '0' then c <= a+b
 

you have a problem just in the 12 ise
 

summ.JPG in ise 11
 

dose ise11 has 24bit adder or you build it yourself?
 

COMPONENT summ
PORT(
a : IN std_logic_vector(23 downto 0);
b : IN std_logic_vector(23 downto 0);
en : IN std_logic;
c : OUT std_logic_vector(23 downto 0)
);
END COMPONENT;

Inst_summ: summ PORT MAP(
a => ,
b => ,
en => ,
c =>
);



////////////////////


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 summ is
Port ( a : in STD_LOGIC_VECTOR (23 downto 0);
b : in STD_LOGIC_VECTOR (23 downto 0);
en : in STD_LOGIC ;
c : out STD_LOGIC_VECTOR (23 downto 0));
end summ;

architecture Behavioral of summ is

begin
adder_en : process( en ) is
begin
if en = '1' then
c <= a + b;
end if;
end process adder_en;

end Behavioral;


and design utilites / create schematic symbol

add symbol in schematic.sch
 
  • Like
Reactions: maia31

    maia31

    Points: 2
    Helpful Answer Positive Rating
COMPONENT summ
PORT(
a : IN std_logic_vector(23 downto 0);
b : IN std_logic_vector(23 downto 0);
en : IN std_logic;
c : OUT std_logic_vector(23 downto 0)
);
END COMPONENT;

Inst_summ: summ PORT MAP(
a => ,
b => ,
en => ,
c =>
);



////////////////////


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 summ is
Port ( a : in STD_LOGIC_VECTOR (23 downto 0);
b : in STD_LOGIC_VECTOR (23 downto 0);
en : in STD_LOGIC ;
c : out STD_LOGIC_VECTOR (23 downto 0));
end summ;

architecture Behavioral of summ is

begin
adder_en : process( en ) is
begin
if en = '1' then
c <= a + b;
end if;
end process adder_en;

end Behavioral;


and design utilites / create schematic symbol

add symbol in schematic.sch

tnx a lot
i write it but i have some question
1=why you define it in process
you can define it in
architecture
2=and if en='0'
what happen?
3=why you use this library?
use IEEE.STD_LOGIC_ARITH.ALL;
 

tnx a lot
i write it but i have some question
1=why you define it in process
you can define it in
architecture
2=and if en='0'
what happen?

Yes you can, but you cannot use "if" outside of a process. You would need to write this instead:

c <= a+b when en = '1';

But the problem with this code, and the origional process, is that is creates a latch, and that is a bad thing. You need a clock, and for a clock it is recommended you use a process.

3=why you use this library?
use IEEE.STD_LOGIC_ARITH.ALL;

There is no need to in this case, many designers and code gen tools add it by default.
 
  • Like
Reactions: maia31

    maia31

    Points: 2
    Helpful Answer Positive Rating
Yes you can, but you cannot use "if" outside of a process. You would need to write this instead:

c <= a+b when en = '1';

But the problem with this code, and the origional process, is that is creates a latch, and that is a bad thing. You need a clock, and for a clock it is recommended you use a process.



There is no need to in this case, many designers and code gen tools add it by default.
you mean i cant use c <= a+b when en = '1';
outside process?
by the way
is process sequential or concurrency type?
 

you mean i cant use c <= a+b when en = '1'; outside process?

Yes you can. You just cannot use "if"


by the way
is process sequential or concurrency type?

Both. Statements inside a process are sequential, but processes are concurrent with each other. But it really depends if you're assigning signals or variables. Variables are updated immediatly, signals are updated the next time the process suspends.

so for this process:

Code:
signal c : natural;

process
  varible x: integer;
begin
  x := 1;
  x := x + 1;

  c <= 1;
  c <= c + 1;
end process;

Because if the way signals and variables work in the above process, x will always be 2. c will incrememnt by 1 and constantly get higher because the second assignment overrides the first assignment.
 
  • Like
Reactions: maia31

    maia31

    Points: 2
    Helpful Answer Positive Rating
Yes! schemes should only be synchronous. I always write process if the conditionю. Programming style
 
  • Like
Reactions: maia31

    maia31

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top