Skip to content

Commit 5bddb52

Browse files
committed
如果採用,此提交將新增使用always製作的clock範例
修改項目: 此為課本沒有的範例,在此新增。 模組: 議題61
1 parent 473a8d3 commit 5bddb52

File tree

3 files changed

+227
-0
lines changed

3 files changed

+227
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module clock_always (clk);
2+
output clk;
3+
reg clk = 0;
4+
5+
always #5 clk =! clk;
6+
7+
endmodule // clock_always
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Product Version: Vivado v2020.1 (64-bit) -->
3+
<!-- -->
4+
<!-- Copyright 1986-2020 Xilinx, Inc. All Rights Reserved. -->
5+
6+
<Project Version="7" Minor="49" Path="/home/timmy/Git/Digital-Logic-Design/VerilogHDL_Practice/CH6/CH6-4/clock_always/clock_always.xpr">
7+
<DefaultLaunch Dir="$PRUNDIR"/>
8+
<Configuration>
9+
<Option Name="Id" Val="5c5fd05cc8ce493b86a7f6ed85006868"/>
10+
<Option Name="Part" Val="xc7a35tcsg324-1"/>
11+
<Option Name="CompiledLibDir" Val="$PCACHEDIR/compile_simlib"/>
12+
<Option Name="CompiledLibDirXSim" Val=""/>
13+
<Option Name="CompiledLibDirModelSim" Val="$PCACHEDIR/compile_simlib/modelsim"/>
14+
<Option Name="CompiledLibDirQuesta" Val="$PCACHEDIR/compile_simlib/questa"/>
15+
<Option Name="CompiledLibDirIES" Val="$PCACHEDIR/compile_simlib/ies"/>
16+
<Option Name="CompiledLibDirXcelium" Val="$PCACHEDIR/compile_simlib/xcelium"/>
17+
<Option Name="CompiledLibDirVCS" Val="$PCACHEDIR/compile_simlib/vcs"/>
18+
<Option Name="CompiledLibDirRiviera" Val="$PCACHEDIR/compile_simlib/riviera"/>
19+
<Option Name="CompiledLibDirActivehdl" Val="$PCACHEDIR/compile_simlib/activehdl"/>
20+
<Option Name="SimulatorInstallDirModelSim" Val=""/>
21+
<Option Name="SimulatorInstallDirQuesta" Val=""/>
22+
<Option Name="SimulatorInstallDirIES" Val=""/>
23+
<Option Name="SimulatorInstallDirXcelium" Val=""/>
24+
<Option Name="SimulatorInstallDirVCS" Val=""/>
25+
<Option Name="SimulatorInstallDirRiviera" Val=""/>
26+
<Option Name="SimulatorInstallDirActiveHdl" Val=""/>
27+
<Option Name="BoardPart" Val=""/>
28+
<Option Name="ActiveSimSet" Val="sim_1"/>
29+
<Option Name="DefaultLib" Val="xil_defaultlib"/>
30+
<Option Name="ProjectType" Val="Default"/>
31+
<Option Name="IPOutputRepo" Val="$PCACHEDIR/ip"/>
32+
<Option Name="IPDefaultOutputPath" Val="$PSRCDIR/sources_1"/>
33+
<Option Name="IPCachePermission" Val="read"/>
34+
<Option Name="IPCachePermission" Val="write"/>
35+
<Option Name="EnableCoreContainer" Val="FALSE"/>
36+
<Option Name="CreateRefXciForCoreContainers" Val="FALSE"/>
37+
<Option Name="IPUserFilesDir" Val="$PIPUSERFILESDIR"/>
38+
<Option Name="IPStaticSourceDir" Val="$PIPUSERFILESDIR/ipstatic"/>
39+
<Option Name="EnableBDX" Val="FALSE"/>
40+
<Option Name="WTXSimLaunchSim" Val="5"/>
41+
<Option Name="WTModelSimLaunchSim" Val="0"/>
42+
<Option Name="WTQuestaLaunchSim" Val="0"/>
43+
<Option Name="WTIesLaunchSim" Val="0"/>
44+
<Option Name="WTVcsLaunchSim" Val="0"/>
45+
<Option Name="WTRivieraLaunchSim" Val="0"/>
46+
<Option Name="WTActivehdlLaunchSim" Val="0"/>
47+
<Option Name="WTXSimExportSim" Val="0"/>
48+
<Option Name="WTModelSimExportSim" Val="0"/>
49+
<Option Name="WTQuestaExportSim" Val="0"/>
50+
<Option Name="WTIesExportSim" Val="0"/>
51+
<Option Name="WTVcsExportSim" Val="0"/>
52+
<Option Name="WTRivieraExportSim" Val="0"/>
53+
<Option Name="WTActivehdlExportSim" Val="0"/>
54+
<Option Name="GenerateIPUpgradeLog" Val="TRUE"/>
55+
<Option Name="XSimRadix" Val="hex"/>
56+
<Option Name="XSimTimeUnit" Val="ns"/>
57+
<Option Name="XSimArrayDisplayLimit" Val="1024"/>
58+
<Option Name="XSimTraceLimit" Val="65536"/>
59+
<Option Name="SimTypes" Val="rtl"/>
60+
<Option Name="SimTypes" Val="bfm"/>
61+
<Option Name="SimTypes" Val="tlm"/>
62+
<Option Name="SimTypes" Val="tlm_dpi"/>
63+
<Option Name="MEMEnableMemoryMapGeneration" Val="TRUE"/>
64+
<Option Name="DcpsUptoDate" Val="TRUE"/>
65+
</Configuration>
66+
<FileSets Version="1" Minor="31">
67+
<FileSet Name="sources_1" Type="DesignSrcs" RelSrcDir="$PSRCDIR/sources_1">
68+
<Filter Type="Srcs"/>
69+
<File Path="$PPRDIR/../clock_always.v">
70+
<FileInfo>
71+
<Attr Name="UsedIn" Val="synthesis"/>
72+
<Attr Name="UsedIn" Val="implementation"/>
73+
<Attr Name="UsedIn" Val="simulation"/>
74+
</FileInfo>
75+
</File>
76+
<Config>
77+
<Option Name="DesignMode" Val="RTL"/>
78+
<Option Name="TopModule" Val="clock_always"/>
79+
<Option Name="TopAutoSet" Val="TRUE"/>
80+
</Config>
81+
</FileSet>
82+
<FileSet Name="constrs_1" Type="Constrs" RelSrcDir="$PSRCDIR/constrs_1">
83+
<Filter Type="Constrs"/>
84+
<Config>
85+
<Option Name="ConstrsType" Val="XDC"/>
86+
</Config>
87+
</FileSet>
88+
<FileSet Name="sim_1" Type="SimulationSrcs" RelSrcDir="$PSRCDIR/sim_1">
89+
<File Path="$PPRDIR/../clock_always_test.v">
90+
<FileInfo>
91+
<Attr Name="UsedIn" Val="synthesis"/>
92+
<Attr Name="UsedIn" Val="implementation"/>
93+
<Attr Name="UsedIn" Val="simulation"/>
94+
</FileInfo>
95+
</File>
96+
<Config>
97+
<Option Name="DesignMode" Val="RTL"/>
98+
<Option Name="TopModule" Val="clock_always_test"/>
99+
<Option Name="TopLib" Val="xil_defaultlib"/>
100+
<Option Name="TopAutoSet" Val="TRUE"/>
101+
<Option Name="TransportPathDelay" Val="0"/>
102+
<Option Name="TransportIntDelay" Val="0"/>
103+
<Option Name="SelectedSimModel" Val="rtl"/>
104+
<Option Name="PamDesignTestbench" Val=""/>
105+
<Option Name="PamDutBypassFile" Val="xil_dut_bypass"/>
106+
<Option Name="PamSignalDriverFile" Val="xil_bypass_driver"/>
107+
<Option Name="PamPseudoTop" Val="pseudo_tb"/>
108+
<Option Name="SrcSet" Val="sources_1"/>
109+
</Config>
110+
</FileSet>
111+
<FileSet Name="utils_1" Type="Utils" RelSrcDir="$PSRCDIR/utils_1">
112+
<Filter Type="Utils"/>
113+
<Config>
114+
<Option Name="TopAutoSet" Val="TRUE"/>
115+
</Config>
116+
</FileSet>
117+
</FileSets>
118+
<Simulators>
119+
<Simulator Name="XSim">
120+
<Option Name="Description" Val="Vivado Simulator"/>
121+
<Option Name="CompiledLib" Val="0"/>
122+
</Simulator>
123+
<Simulator Name="ModelSim">
124+
<Option Name="Description" Val="ModelSim Simulator"/>
125+
</Simulator>
126+
<Simulator Name="Questa">
127+
<Option Name="Description" Val="Questa Advanced Simulator"/>
128+
</Simulator>
129+
<Simulator Name="IES">
130+
<Option Name="Description" Val="Incisive Enterprise Simulator (IES)"/>
131+
</Simulator>
132+
<Simulator Name="Xcelium">
133+
<Option Name="Description" Val="Xcelium Parallel Simulator"/>
134+
</Simulator>
135+
<Simulator Name="VCS">
136+
<Option Name="Description" Val="Verilog Compiler Simulator (VCS)"/>
137+
</Simulator>
138+
<Simulator Name="Riviera">
139+
<Option Name="Description" Val="Riviera-PRO Simulator"/>
140+
</Simulator>
141+
</Simulators>
142+
<Runs Version="1" Minor="11">
143+
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35tcsg324-1" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true">
144+
<Strategy Version="1" Minor="2">
145+
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020">
146+
<Desc>Vivado Synthesis Defaults</Desc>
147+
</StratHandle>
148+
<Step Id="synth_design"/>
149+
</Strategy>
150+
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
151+
<ReportStrategy Name="Vivado Synthesis Default Reports" Flow="Vivado Synthesis 2020"/>
152+
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
153+
<RQSFiles/>
154+
</Run>
155+
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35tcsg324-1" ConstrsSet="constrs_1" Description="Default settings for Implementation." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" GenFullBitstream="true">
156+
<Strategy Version="1" Minor="2">
157+
<StratHandle Name="Vivado Implementation Defaults" Flow="Vivado Implementation 2020">
158+
<Desc>Default settings for Implementation.</Desc>
159+
</StratHandle>
160+
<Step Id="init_design"/>
161+
<Step Id="opt_design"/>
162+
<Step Id="power_opt_design"/>
163+
<Step Id="place_design"/>
164+
<Step Id="post_place_power_opt_design"/>
165+
<Step Id="phys_opt_design"/>
166+
<Step Id="route_design"/>
167+
<Step Id="post_route_phys_opt_design"/>
168+
<Step Id="write_bitstream"/>
169+
</Strategy>
170+
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
171+
<ReportStrategy Name="Vivado Implementation Default Reports" Flow="Vivado Implementation 2020"/>
172+
<Report Name="ROUTE_DESIGN.REPORT_METHODOLOGY" Enabled="1"/>
173+
<RQSFiles/>
174+
</Run>
175+
</Runs>
176+
<Board/>
177+
<DashboardSummary Version="1" Minor="0">
178+
<Dashboards>
179+
<Dashboard Name="default_dashboard">
180+
<Gadgets>
181+
<Gadget Name="drc_1" Type="drc" Version="1" Row="2" Column="0">
182+
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_drc_0 "/>
183+
</Gadget>
184+
<Gadget Name="methodology_1" Type="methodology" Version="1" Row="2" Column="1">
185+
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_methodology_0 "/>
186+
</Gadget>
187+
<Gadget Name="power_1" Type="power" Version="1" Row="1" Column="0">
188+
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_power_0 "/>
189+
</Gadget>
190+
<Gadget Name="timing_1" Type="timing" Version="1" Row="0" Column="1">
191+
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_route_report_timing_summary_0 "/>
192+
</Gadget>
193+
<Gadget Name="utilization_1" Type="utilization" Version="1" Row="0" Column="0">
194+
<GadgetParam Name="REPORTS" Type="string_list" Value="synth_1#synth_1_synth_report_utilization_0 "/>
195+
<GadgetParam Name="RUN.STEP" Type="string" Value="synth_design"/>
196+
<GadgetParam Name="RUN.TYPE" Type="string" Value="synthesis"/>
197+
</Gadget>
198+
<Gadget Name="utilization_2" Type="utilization" Version="1" Row="1" Column="1">
199+
<GadgetParam Name="REPORTS" Type="string_list" Value="impl_1#impl_1_place_report_utilization_0 "/>
200+
</Gadget>
201+
</Gadgets>
202+
</Dashboard>
203+
<CurrentDashboard>default_dashboard</CurrentDashboard>
204+
</Dashboards>
205+
</DashboardSummary>
206+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
`timescale 1ns / 1ps
2+
3+
module clock_always_test ();
4+
wire clk;
5+
6+
7+
clock_always UUT (.clk(clk));
8+
9+
initial begin
10+
#320;
11+
$finish;
12+
end
13+
14+
endmodule // clock_always_test

0 commit comments

Comments
 (0)