aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-11-11 11:51:46 +0100
committerlonkaars <loek@pipeframe.xyz>2022-11-11 11:51:46 +0100
commit40d5566d56c125fc044b3849d86778780fc4516e (patch)
tree9a984511bbaad8eac74a93ba2b496422a863f3f7
parent9ceab8dbefe658b9938b0ed12b50492304fcce3a (diff)
feedback week 1 half verwerkt
-rw-r--r--full-adder/full-adder.srcs/sim_1/add4b_tb.vhd1
-rw-r--r--full-adder/full-adder.srcs/sources_1/add4b.vhd27
-rw-r--r--full-adder/full-adder.xpr31
3 files changed, 35 insertions, 24 deletions
diff --git a/full-adder/full-adder.srcs/sim_1/add4b_tb.vhd b/full-adder/full-adder.srcs/sim_1/add4b_tb.vhd
index 312cf22..e5e548c 100644
--- a/full-adder/full-adder.srcs/sim_1/add4b_tb.vhd
+++ b/full-adder/full-adder.srcs/sim_1/add4b_tb.vhd
@@ -48,6 +48,7 @@ begin
for I in 0 to 255 loop
Test_case <= Std_logic_vector(to_unsigned(I,8));
+ wait for 1 ps;
A(0) <= Test_case(0);
A(1) <= Test_case(1);
A(2) <= Test_case(2);
diff --git a/full-adder/full-adder.srcs/sources_1/add4b.vhd b/full-adder/full-adder.srcs/sources_1/add4b.vhd
index e70862b..184d360 100644
--- a/full-adder/full-adder.srcs/sources_1/add4b.vhd
+++ b/full-adder/full-adder.srcs/sources_1/add4b.vhd
@@ -37,16 +37,23 @@ architecture Behavioral of add1b is
signal s0: std_logic;
signal s1: std_logic;
signal s2: std_logic;
+ component half_add
+ port (
+ A: in std_logic;
+ B: in std_logic;
+ X: out std_logic;
+ Cout: out std_logic);
+ end component;
begin
-- first add A and B with HA
- add0: entity work.half_add
+ add0: component half_add
port map (
A => A,
B => B,
X => s0,
Cout => s1);
-- then add first result with Cin to get final result
- add1: entity work.half_add
+ add1: component half_add
port map (
A => Cin,
B => s0,
@@ -76,30 +83,38 @@ architecture Behavioral of add4b is
signal C0: std_logic; -- Cout0 -> Cin1
signal C1: std_logic; -- Cout1 -> Cin2
signal C2: std_logic; -- Cout2 -> Cin3
+ component add1b
+ port (
+ A: in std_logic;
+ B: in std_logic;
+ Cin: in std_logic;
+ X: out std_logic;
+ Cout: out std_logic);
+ end component;
begin
-- full adder ladder (e.g. Cin -> Cin0, Cout0 -> Cin1, ..., Cout3 -> Cout)
- add0: entity work.add1b
+ add0: component add1b
port map (
A => A(0),
B => B(0),
Cin => Cin,
X => X(0),
Cout => C0);
- add1: entity work.add1b
+ add1: component add1b
port map (
A => A(1),
B => B(1),
Cin => C0,
X => X(1),
Cout => C1);
- add2: entity work.add1b
+ add2: component add1b
port map (
A => A(2),
B => B(2),
Cin => C1,
X => X(2),
Cout => C2);
- add3: entity work.add1b
+ add3: component add1b
port map (
A => A(3),
B => B(3),
diff --git a/full-adder/full-adder.xpr b/full-adder/full-adder.xpr
index 4fcc50a..853afea 100644
--- a/full-adder/full-adder.xpr
+++ b/full-adder/full-adder.xpr
@@ -42,8 +42,7 @@
<Option Name="SimulatorGccVersionVCS" Val="9.2.0"/>
<Option Name="SimulatorGccVersionRiviera" Val="9.3.0"/>
<Option Name="SimulatorGccVersionActiveHdl" Val="9.3.0"/>
- <Option Name="BoardPart" Val="digilentinc.com:basys3:part0:1.2"/>
- <Option Name="BoardPartRepoPaths" Val="$PPRDIR/../../../../.Xilinx/Vivado/2022.2/xhub/board_store/xilinx_board_store"/>
+ <Option Name="BoardPart" Val=""/>
<Option Name="ActiveSimSet" Val="sim_1"/>
<Option Name="DefaultLib" Val="xil_defaultlib"/>
<Option Name="ProjectType" Val="Default"/>
@@ -59,7 +58,7 @@
<Option Name="IPStaticSourceDir" Val="$PIPUSERFILESDIR/ipstatic"/>
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="DSABoardId" Val="basys3"/>
- <Option Name="WTXSimLaunchSim" Val="2"/>
+ <Option Name="WTXSimLaunchSim" Val="4"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>
@@ -96,15 +95,9 @@
<Attr Name="UsedIn" Val="simulation"/>
</FileInfo>
</File>
- <File Path="$PSRCDIR/sim_1/add4b_tb.vhd">
- <FileInfo>
- <Attr Name="UsedIn" Val="synthesis"/>
- <Attr Name="UsedIn" Val="simulation"/>
- </FileInfo>
- </File>
<Config>
<Option Name="DesignMode" Val="RTL"/>
- <Option Name="TopModule" Val="add4b_tb"/>
+ <Option Name="TopModule" Val="add4b"/>
<Option Name="TopAutoSet" Val="TRUE"/>
<Option Name="dataflowViewerSettings" Val="min_width=16"/>
</Config>
@@ -127,7 +120,6 @@
<Option Name="DesignMode" Val="RTL"/>
<Option Name="TopModule" Val="add4b_tb"/>
<Option Name="TopLib" Val="xil_defaultlib"/>
- <Option Name="TopArchitecture" Val="behavioral"/>
<Option Name="TopAutoSet" Val="TRUE"/>
<Option Name="TransportPathDelay" Val="0"/>
<Option Name="TransportIntDelay" Val="0"/>
@@ -141,7 +133,7 @@
</FileSet>
<FileSet Name="utils_1" Type="Utils" RelSrcDir="$PSRCDIR/utils_1" RelGenDir="$PGENDIR/utils_1">
<Filter Type="Utils"/>
- <File Path="$PSRCDIR/utils_1/imports/synth_1/add4b.dcp">
+ <File Path="$PSRCDIR/utils_1/imports/synth_1/add4b_tb.dcp">
<FileInfo>
<Attr Name="UsedIn" Val="synthesis"/>
<Attr Name="UsedIn" Val="implementation"/>
@@ -176,18 +168,23 @@
</Simulator>
</Simulators>
<Runs Version="1" Minor="19">
- <Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="true" IncrementalCheckpoint="$PSRCDIR/utils_1/imports/synth_1/add4b.dcp" WriteIncrSynthDcp="false" State="current" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1">
+ <Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="true" IncrementalCheckpoint="$PSRCDIR/utils_1/imports/synth_1/add4b_tb.dcp" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022"/>
+ <StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2022">
+ <Desc>Vivado Synthesis Defaults</Desc>
+ </StratHandle>
<Step Id="synth_design"/>
</Strategy>
+ <GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
<ReportStrategy Name="Vivado Synthesis Default Reports" Flow="Vivado Synthesis 2022"/>
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
<RQSFiles/>
</Run>
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcpg236-1" ConstrsSet="constrs_1" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1">
<Strategy Version="1" Minor="2">
- <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022"/>
+ <StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2022">
+ <Desc>Default settings for Implementation.</Desc>
+ </StratHandle>
<Step Id="init_design"/>
<Step Id="opt_design"/>
<Step Id="power_opt_design"/>
@@ -203,9 +200,7 @@
<RQSFiles/>
</Run>
</Runs>
- <Board>
- <Jumpers/>
- </Board>
+ <Board/>
<DashboardSummary Version="1" Minor="0">
<Dashboards>
<Dashboard Name="default_dashboard">