Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Like punning, programming is a play on words.


devel / comp.lang.vhdl / Re: 8-bit full adder issue

SubjectAuthor
* 8-bit full adder issueMarco De Luca
`* 8-bit full adder issueMarc Guardiani
 `- 8-bit full adder issueMarc Guardiani

1
8-bit full adder issue

<fa78772b-0cbd-436d-87e0-e8a148af3aa7n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=84&group=comp.lang.vhdl#84

  copy link   Newsgroups: comp.lang.vhdl
X-Received: by 2002:a05:622a:1813:b0:3eb:572:226 with SMTP id t19-20020a05622a181300b003eb05720226mr3238953qtc.5.1681745804850;
Mon, 17 Apr 2023 08:36:44 -0700 (PDT)
X-Received: by 2002:a25:da43:0:b0:b68:7b14:186b with SMTP id
n64-20020a25da43000000b00b687b14186bmr7929329ybf.1.1681745804565; Mon, 17 Apr
2023 08:36:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.vhdl
Date: Mon, 17 Apr 2023 08:36:44 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:67c:2660:425:23:0:0:216;
posting-account=zdwbRAoAAACL55azc3-lI-wZmDqKLgWp
NNTP-Posting-Host: 2001:67c:2660:425:23:0:0:216
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fa78772b-0cbd-436d-87e0-e8a148af3aa7n@googlegroups.com>
Subject: 8-bit full adder issue
From: marco.deluca.i71@gmail.com (Marco De Luca)
Injection-Date: Mon, 17 Apr 2023 15:36:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 134
 by: Marco De Luca - Mon, 17 Apr 2023 15:36 UTC

stavo seguendo la lezione del mio insegnante e ho copiato il suo codice. Il suo compilatore
non ha dato alcun avviso o errore, ma quando provo a compilarlo con my
PC, viene visualizzato un avviso sui componenti non limitati. ci ho provato
usa anche std_logic invece di bit, ma niente (idk ho ​​provato tutto).
Sto iniziando a odiare vhdl e non so cosa devo fare. Ragazzi
hai qualche idea?
Grazie a tutti in anticipo

SCRIPT 1
entity addern is
generic (enne: integer:=8);
port( c_in: in bit;
x_in: in bit_vector (enne-1 downto 0);
y_in: in bit_vector (enne-1 downto 0);
c_out, s: out bit;
s_out: out bit_vector (enne-1 downto 0)
);
end entity;
-- quello che ho fatto qui è definire praticamente una serie di 8 full adder, praticamente lo posso immaginare come una black box in cui all'interno ho tutti i componenti
-- che sto per andare a definire all'interno dell'architecture
architecture archi of addern is
signal carry_chain : bit_vector (enne-2 downto 0);

component cfa is
port(
a: in bit;
b: in bit;
ci:in bit;
s: out bit;
co: out bit
);
end component;
begin
--qui è necessario fare attenzione perchè tutti i blocchetti non sono uguali, i due estremi non sono collegati a nulla, mentre quelli interni invece sono collegati tra di loro
gen_stat: for index in 0 to (enne-1) generate
--fino all'end generate qui è come se stessimo mettendo uno dopo l'altro n pezzi.
--come già detto abbiamo 3 differenti casi di blocchetti: estremo destro, estremo sinistro e interni:
begin
prima_cella:if (index=0) generate
begin
cella_0: component cfa
port map(a=>x_in(index),
b=>y_in(index),
ci=>c_in,
s=>s_out(index),
co=>carry_chain(index)
);
end generate;
ultima_cella:if (index=(enne-1)) generate
begin
cella_n: component cfa
port map(a=>x_in(index),
b=>y_in(index),
ci=>carry_chain(index-1),
s=>s_out(index),
co=>c_out
);
end generate;

altre_celle:if ((index/=0) and (index/=(enne-1)))generate
begin
celle: component cfa
port map(a=>x_in(index),
b=>y_in(index),
ci=>carry_chain(index-1),
s=>s_out(index),
co=>carry_chain(index)
);
end generate;
end generate;
end architecture;

TESTBENCH (SCRIPT2)
entity tb is
end entity;

architecture struct of tb is
signal add1,add2,somma : bit_vector (7 downto 0);
signal riporto : bit;
begin
sommatore: entity work.addern
generic map (enne=>8)
port map(x_in=>add1, y_in=>add2, c_in=>'0',c_out=>riporto, s_out=>somma);

process is
begin
add1<="00000000";
add2<="00000000";
wait for 50 ns;
add1<="00001100";
add2<="11100000";
wait for 50 ns;
add1<="00011100";
add2<="00011111";
wait for 50 ns;
add1<="00001111";
add2<="11100000";
wait for 50 ns;
add1<="01111111";
add2<="00000111";
wait for 50 ns;
add1<="00011100";
add2<="00010000";
wait for 50 ns;
add1<="01110010";
add2<="00000111";
wait for 50 ns;
add1<="00111100";
add2<="01111100";
wait for 50 ns;
wait;
end process;
end architecture;

ERRORS:
adder_n.vhd:35:40:warning: component instance "cella_sin" is not bound
adder_n.vhd:15:14:warning: (in default configuration of addern(archi))
adder_n.vhd:45:41:warning: component instance "cella_des" is not bound
adder_n.vhd:15:14:warning: (in default configuration of addern(archi))
adder_n.vhd:56:40:warning: component instance "celle" is not bound
adder_n.vhd:15:14:warning: (in default configuration of addern(archi))

Re: 8-bit full adder issue

<f9f3a995-d04e-4907-a668-41c6928b424cn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=85&group=comp.lang.vhdl#85

  copy link   Newsgroups: comp.lang.vhdl
X-Received: by 2002:a05:6214:a08:b0:5ef:4c4d:1cb8 with SMTP id dw8-20020a0562140a0800b005ef4c4d1cb8mr2198031qvb.8.1681767308398;
Mon, 17 Apr 2023 14:35:08 -0700 (PDT)
X-Received: by 2002:a25:d6d4:0:b0:b8e:ec30:853e with SMTP id
n203-20020a25d6d4000000b00b8eec30853emr8460700ybg.4.1681767308220; Mon, 17
Apr 2023 14:35:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.vhdl
Date: Mon, 17 Apr 2023 14:35:08 -0700 (PDT)
In-Reply-To: <fa78772b-0cbd-436d-87e0-e8a148af3aa7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.71.184.234; posting-account=tm0w8woAAADeGQypQ3zH5sMmYM3ldVzT
NNTP-Posting-Host: 173.71.184.234
References: <fa78772b-0cbd-436d-87e0-e8a148af3aa7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f9f3a995-d04e-4907-a668-41c6928b424cn@googlegroups.com>
Subject: Re: 8-bit full adder issue
From: news.guardiani@gmail.com (Marc Guardiani)
Injection-Date: Mon, 17 Apr 2023 21:35:08 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5569
 by: Marc Guardiani - Mon, 17 Apr 2023 21:35 UTC

On Monday, April 17, 2023 at 11:36:46 AM UTC-4, Marco De Luca wrote:
> stavo seguendo la lezione del mio insegnante e ho copiato il suo codice. Il suo compilatore
> non ha dato alcun avviso o errore, ma quando provo a compilarlo con my
> PC, viene visualizzato un avviso sui componenti non limitati. ci ho provato
> usa anche std_logic invece di bit, ma niente (idk ho ​​provato tutto).
> Sto iniziando a odiare vhdl e non so cosa devo fare. Ragazzi
> hai qualche idea?
> Grazie a tutti in anticipo
>
> SCRIPT 1
> entity addern is
> generic (enne: integer:=8);
> port( c_in: in bit;
> x_in: in bit_vector (enne-1 downto 0);
> y_in: in bit_vector (enne-1 downto 0);
> c_out, s: out bit;
> s_out: out bit_vector (enne-1 downto 0)
> );
> end entity;
> -- quello che ho fatto qui è definire praticamente una serie di 8 full adder, praticamente lo posso immaginare come una black box in cui all'interno ho tutti i componenti
> -- che sto per andare a definire all'interno dell'architecture
> architecture archi of addern is
> signal carry_chain : bit_vector (enne-2 downto 0);
>
> component cfa is
> port(
> a: in bit;
> b: in bit;
> ci:in bit;
> s: out bit;
> co: out bit
> );
> end component;
> begin
> --qui è necessario fare attenzione perchè tutti i blocchetti non sono uguali, i due estremi non sono collegati a nulla, mentre quelli interni invece sono collegati tra di loro
> gen_stat: for index in 0 to (enne-1) generate
> --fino all'end generate qui è come se stessimo mettendo uno dopo l'altro n pezzi.
> --come già detto abbiamo 3 differenti casi di blocchetti: estremo destro, estremo sinistro e interni:
> begin
> prima_cella:if (index=0) generate
> begin
> cella_0: component cfa
> port map(a=>x_in(index),
> b=>y_in(index),
> ci=>c_in,
> s=>s_out(index),
> co=>carry_chain(index)
> );
> end generate;
> ultima_cella:if (index=(enne-1)) generate
> begin
> cella_n: component cfa
> port map(a=>x_in(index),
> b=>y_in(index),
> ci=>carry_chain(index-1),
> s=>s_out(index),
> co=>c_out
> );
> end generate;
>
> altre_celle:if ((index/=0) and (index/=(enne-1)))generate
> begin
> celle: component cfa
> port map(a=>x_in(index),
> b=>y_in(index),
> ci=>carry_chain(index-1),
> s=>s_out(index),
> co=>carry_chain(index)
> );
> end generate;
> end generate;
> end architecture;
>
>
>
>
>
> TESTBENCH (SCRIPT2)
> entity tb is
> end entity;
>
> architecture struct of tb is
> signal add1,add2,somma : bit_vector (7 downto 0);
> signal riporto : bit;
> begin
> sommatore: entity work.addern
> generic map (enne=>8)
> port map(x_in=>add1, y_in=>add2, c_in=>'0',c_out=>riporto, s_out=>somma);
>
> process is
> begin
> add1<="00000000";
> add2<="00000000";
> wait for 50 ns;
> add1<="00001100";
> add2<="11100000";
> wait for 50 ns;
> add1<="00011100";
> add2<="00011111";
> wait for 50 ns;
> add1<="00001111";
> add2<="11100000";
> wait for 50 ns;
> add1<="01111111";
> add2<="00000111";
> wait for 50 ns;
> add1<="00011100";
> add2<="00010000";
> wait for 50 ns;
> add1<="01110010";
> add2<="00000111";
> wait for 50 ns;
> add1<="00111100";
> add2<="01111100";
> wait for 50 ns;
> wait;
> end process;
> end architecture;
>
>
> ERRORS:
> adder_n.vhd:35:40:warning: component instance "cella_sin" is not bound
> adder_n.vhd:15:14:warning: (in default configuration of addern(archi))
> adder_n.vhd:45:41:warning: component instance "cella_des" is not bound
> adder_n.vhd:15:14:warning: (in default configuration of addern(archi))
> adder_n.vhd:56:40:warning: component instance "celle" is not bound
> adder_n.vhd:15:14:warning: (in default configuration of addern(archi))

Remove the extra "begin" statements after each generate (in 4 places). For example:

gen_stat: for index in 0 to (enne-1) generate
--REMOVE begin

--Marc

Re: 8-bit full adder issue

<482f2e41-6ebe-4960-b55f-85b24ac153b4n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=86&group=comp.lang.vhdl#86

  copy link   Newsgroups: comp.lang.vhdl
X-Received: by 2002:a05:620a:139c:b0:74d:1be5:f1a3 with SMTP id k28-20020a05620a139c00b0074d1be5f1a3mr2452190qki.15.1681869146383;
Tue, 18 Apr 2023 18:52:26 -0700 (PDT)
X-Received: by 2002:a25:d292:0:b0:b96:347d:46e7 with SMTP id
j140-20020a25d292000000b00b96347d46e7mr1135511ybg.1.1681869146144; Tue, 18
Apr 2023 18:52:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.vhdl
Date: Tue, 18 Apr 2023 18:52:25 -0700 (PDT)
In-Reply-To: <f9f3a995-d04e-4907-a668-41c6928b424cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.71.184.234; posting-account=tm0w8woAAADeGQypQ3zH5sMmYM3ldVzT
NNTP-Posting-Host: 173.71.184.234
References: <fa78772b-0cbd-436d-87e0-e8a148af3aa7n@googlegroups.com> <f9f3a995-d04e-4907-a668-41c6928b424cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <482f2e41-6ebe-4960-b55f-85b24ac153b4n@googlegroups.com>
Subject: Re: 8-bit full adder issue
From: news.guardiani@gmail.com (Marc Guardiani)
Injection-Date: Wed, 19 Apr 2023 01:52:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2239
 by: Marc Guardiani - Wed, 19 Apr 2023 01:52 UTC

On Monday, April 17, 2023 at 5:35:10 PM UTC-4, Marc Guardiani wrote:
> On Monday, April 17, 2023 at 11:36:46 AM UTC-4, Marco De Luca wrote:
> > stavo seguendo la lezione del mio insegnante e ho copiato il suo codice.. Il suo compilatore
> > non ha dato alcun avviso o errore, ma quando provo a compilarlo con my
> > PC, viene visualizzato un avviso sui componenti non limitati. ci ho provato
> > usa anche std_logic invece di bit, ma niente (idk ho ​​provato tutto).
> > Sto iniziando a odiare vhdl e non so cosa devo fare. Ragazzi
> > hai qualche idea?
> > Grazie a tutti in anticipo
> >

<snip vhdl code>

> Remove the extra "begin" statements after each generate (in 4 places). For example:
> gen_stat: for index in 0 to (enne-1) generate
> --REMOVE begin
>
> --Marc

OK, if you haven't gotten it yet. Here's another hint:
You have to define an entity named cfa that does your one bit adder.

--Marc

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor