Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"Freedom is still the most radical idea of all." -- Nathaniel Branden


devel / comp.lang.vhdl / Re: Components in if-else statement

SubjectAuthor
* Components in if-else statementtushar sharma
`- Components in if-else statementNicolas Matringe

1
Components in if-else statement

<383d2497-6a69-49cc-b2e3-5607a61e613dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.vhdl
X-Received: by 2002:a05:622a:588:b0:2f3:bca9:ea34 with SMTP id c8-20020a05622a058800b002f3bca9ea34mr21009793qtb.601.1652207600454;
Tue, 10 May 2022 11:33:20 -0700 (PDT)
X-Received: by 2002:a0d:cd06:0:b0:2f8:f39c:4cfc with SMTP id
p6-20020a0dcd06000000b002f8f39c4cfcmr19533754ywd.495.1652207600172; Tue, 10
May 2022 11:33:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.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, 10 May 2022 11:33:19 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2401:4900:1c5c:6301:da2:5085:cddc:27d9;
posting-account=ArqZqgoAAACkCGUJ0Uxb2Yvzz4duHIKU
NNTP-Posting-Host: 2401:4900:1c5c:6301:da2:5085:cddc:27d9
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <383d2497-6a69-49cc-b2e3-5607a61e613dn@googlegroups.com>
Subject: Components in if-else statement
From: sharmatushar260@gmail.com (tushar sharma)
Injection-Date: Tue, 10 May 2022 18:33:20 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3033
 by: tushar sharma - Tue, 10 May 2022 18:33 UTC

I am trying to make a cube computation circuit using Vedic Algorithms.
The code is as follows:
--------------MAIN FILE-------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.ALL;
entity major_8_bit is

port(
N: in std_logic_vector(7 downto 0);
Result: out std_logic_vector(23 downto 0));

end major_8_bit;

architecture RTL of major_8_bit is

component compare
port( N: in std_logic_vector(7 downto 0);
enable: out std_logic);
end component;

component cubeComputation8bit_YES
port(
N: in std_logic_vector(7 downto 0);
Result: out std_logic_vector(23 downto 0));
end component;

component cubeComputation8bit_NO
port(
N: in std_logic_vector(7 downto 0);
Result: out std_logic_vector(24 downto 0));
--to concatenate the carry bit generated from 24bit BA at the 24th index (starting from 1)
end component;
--signals
signal R: std_logic_vector( 7 downto 0);
signal R2: std_logic_vector (7 downto 0):="00001111";
signal ResultNo: std_logic_vector( 24 downto 0);
signal EnableSignal: std_logic;
begin
R <= 100000000 - N;
--enable <= EnableSignal;

Comp: compare port map( N, EnableSignal);

YesCase: if(EnableSignal = '1') generate -- YES CASE
CP1: cubeComputation8bit_YES port map (N,Result);
end generate YesCase;
NoCase: if(EnableSignal = '0') generate
CP2: cubeComputation8bit_NO port map(N=>N,Result=> ResultNo);
end generate NoCase;
end;
*********************
There is no syntax error being reported, but the code is not simulating because of the components used in the if-else statement (Saw this method on stackoverflow)
The two components cubeComputation8bit_Yes and cubeComputation8bit_NO are working correctly independently. But not when put together this way.

Any help will be highly appreciated.
Regards.

Re: Components in if-else statement

<6282afbc$0$9148$426a74cc@news.free.fr>

  copy mid

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

  copy link   Newsgroups: comp.lang.vhdl
Path: i2pn2.org!i2pn.org!aioe.org!nntp.terraraq.uk!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-b.proxad.net!nnrp1-1.free.fr!not-for-mail
Date: Mon, 16 May 2022 22:10:36 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101
Thunderbird/91.8.1
Subject: Re: Components in if-else statement
Content-Language: en-US
References: <383d2497-6a69-49cc-b2e3-5607a61e613dn@googlegroups.com>
From: nicolas.matringe@fre.fre (Nicolas Matringe)
Newsgroups: comp.lang.vhdl
In-Reply-To: <383d2497-6a69-49cc-b2e3-5607a61e613dn@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 14
Message-ID: <6282afbc$0$9148$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 16 May 2022 22:10:36 CEST
NNTP-Posting-Host: 82.65.67.227
X-Trace: 1652731836 news-1.free.fr 9148 82.65.67.227:20265
X-Complaints-To: abuse@proxad.net
 by: Nicolas Matringe - Mon, 16 May 2022 20:10 UTC

On 5/10/22 18:33, tushar sharma wrote:
> I am trying to make a cube computation circuit using Vedic Algorithms.
> The code is as follows:
[...]
> *********************
> There is no syntax error being reported, but the code is not simulating because of the components used in the if-else statement (Saw this method on stackoverflow)
> The two components cubeComputation8bit_Yes and cubeComputation8bit_NO are working correctly independently. But not when put together this way.

You can not use the "if <...> generate" with a signal. It doesn't make
any sense.
Your code doesn't make much sense either. It looks like you're using
VHDL as a programming language, which it is definitely not.

Nicolas

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor