ch12.a.htm
来自「介绍asci设计的一本书」· HTM 代码 · 共 839 行 · 第 1/2 页
HTM
839 行
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="ComputerFirstLabel">
<A NAME="pgfId=297333">
</A>
<B CLASS="Keyword">
library</B>
COMPASS_LIB, IEEE ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297334">
</A>
<B CLASS="Keyword">
use</B>
IEEE.STD.<B CLASS="Keyword">
all</B>
; <B CLASS="Keyword">
use</B>
IEEE.NUMERIC_STD.<B CLASS="Keyword">
all</B>
; </P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297335">
</A>
<B CLASS="Keyword">
use</B>
COMPASS_LIB.STDCOMP.<B CLASS="Keyword">
all</B>
; <B CLASS="Keyword">
use</B>
COMPASS_LIB.COMPASS.<B CLASS="Keyword">
all</B>
;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297336">
</A>
</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297337">
</A>
<B CLASS="Keyword">
entity</B>
t_control_ASIC <B CLASS="Keyword">
is</B>
<B CLASS="Keyword">
port</B>
(</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297338">
</A>
PadTri : <B CLASS="Keyword">
out</B>
STD_LOGIC_VECTOR (11 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297339">
</A>
PadClk, PadInreset, PadInreadv : <B CLASS="Keyword">
in</B>
STD_LOGIC_VECTOR ( 0 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297340">
</A>
PadInp1, PadInp2 : <B CLASS="Keyword">
in</B>
STD_LOGIC_VECTOR (11 <B CLASS="Keyword">
downto</B>
0) ; </P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297341">
</A>
PadInSens : <B CLASS="Keyword">
in</B>
STD_LOGIC_VECTOR ( 1 <B CLASS="Keyword">
downto</B>
0) ) ; </P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297342">
</A>
<B CLASS="Keyword">
end</B>
t_control_ASIC ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297343">
</A>
</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297344">
</A>
<B CLASS="Keyword">
architecture</B>
structure <B CLASS="Keyword">
of</B>
t_control_ASIC <B CLASS="Keyword">
is</B>
</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297345">
</A>
<B CLASS="Keyword">
for</B>
<B CLASS="Keyword">
all</B>
: asPadIn <B CLASS="Keyword">
use</B>
<B CLASS="Keyword">
entity</B>
COMPASS_LIB.aspadIn(aspadIn) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297346">
</A>
<B CLASS="Keyword">
for</B>
<B CLASS="Keyword">
all</B>
: asPadClk <B CLASS="Keyword">
use</B>
<B CLASS="Keyword">
entity</B>
COMPASS_LIB.aspadClk(aspadClk);</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297347">
</A>
<B CLASS="Keyword">
for</B>
<B CLASS="Keyword">
all</B>
: asPadTri <B CLASS="Keyword">
use</B>
<B CLASS="Keyword">
entity</B>
COMPASS_LIB.aspadTri(aspadTri) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297348">
</A>
<B CLASS="Keyword">
for</B>
<B CLASS="Keyword">
all</B>
: asPadVdd <B CLASS="Keyword">
use</B>
<B CLASS="Keyword">
entity</B>
COMPASS_LIB.aspadVdd(aspadVdd) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297349">
</A>
<B CLASS="Keyword">
for</B>
<B CLASS="Keyword">
all</B>
: asPadVss <B CLASS="Keyword">
use</B>
<B CLASS="Keyword">
entity</B>
COMPASS_LIB.aspadVss(aspadVss) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297350">
</A>
<B CLASS="Keyword">
component</B>
pc3c01 <B CLASS="Keyword">
port</B>
( cclk : <B CLASS="Keyword">
in</B>
STD_LOGIC; cp : <B CLASS="Keyword">
out</B>
STD_LOGIC ); <B CLASS="Keyword">
end</B>
<B CLASS="Keyword">
component</B>
;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297351">
</A>
<B CLASS="Keyword">
component</B>
t_control port(T_in1, T_in2 : in UNSIGNED(11 <B CLASS="Keyword">
downto</B>
0);</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297352">
</A>
SENSOR: <B CLASS="Keyword">
in</B>
UNSIGNED( 1 <B CLASS="Keyword">
downto</B>
0) ; clk, rd, rst : <B CLASS="Keyword">
in</B>
STD_LOGIC;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297353">
</A>
D : <B CLASS="Keyword">
out</B>
UNSIGNED(11 <B CLASS="Keyword">
downto</B>
0); oe_b : <B CLASS="Keyword">
out</B>
STD_LOGIC ); <B CLASS="Keyword">
end</B>
<B CLASS="Keyword">
component</B>
; </P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297354">
</A>
<B CLASS="Keyword">
signal</B>
T_in1_sv, T_in2_sv : STD_LOGIC_VECTOR(11 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297355">
</A>
<B CLASS="Keyword">
signal</B>
T_in1_un, T_in2_un : UNSIGNED(11 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297356">
</A>
<B CLASS="Keyword">
signal</B>
sensor_sv : STD_LOGIC_VECTOR(1 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297357">
</A>
<B CLASS="Keyword">
signal</B>
sensor_un : UNSIGNED(1 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297358">
</A>
<B CLASS="Keyword">
signal</B>
clk_sv, rd_fifo_sv, reset_sv : STD_LOGIC_VECTOR (0 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297359">
</A>
<B CLASS="Keyword">
signal</B>
clk_core, oe_b : STD_LOGIC ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297360">
</A>
<B CLASS="Keyword">
signal</B>
D_un : UNSIGNED(11 <B CLASS="Keyword">
downto</B>
0) ; <B CLASS="Keyword">
signal</B>
D_sv : STD_LOGIC_VECTOR(11 <B CLASS="Keyword">
downto</B>
0) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297361">
</A>
<B CLASS="Keyword">
begin</B>
--compass dontTouch u* -- synopsys dont_touch etc.</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297362">
</A>
u1 : asPadIn <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(12,"2:13") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(t_in1_sv,PadInp1) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297363">
</A>
u2 : asPadIn <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(12,"14:25") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(t_in2_sv,PadInp2) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297364">
</A>
u3 : asPadIn <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(2,"26:27") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(sensor_sv, PadInSens ) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297365">
</A>
u4 : asPadIn <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(1,"29") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(rd_fifo_sv, PadInReadv ) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297366">
</A>
u5 : asPadIn <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(1,"30") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(reset_sv, PadInreset ) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297367">
</A>
u6 : asPadIn <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(1,"32") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(clk_sv, PadClk) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297368">
</A>
u7 : pc3c01 <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(clk_sv(0), clk_core) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297369">
</A>
u8 : asPadTri <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
(12,"35:38,41:44,47:50") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(PadTri,D_sv,oe_b);</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297370">
</A>
u9 : asPadVdd <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
("1,31,34,40,45,52") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(Vdd) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297371">
</A>
u10: asPadVss <B CLASS="Keyword">
generic</B>
<B CLASS="Keyword">
map</B>
("28,33,39,46,51,53") <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
(Vss) ;</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297372">
</A>
T_in1_un <= UNSIGNED(T_in1_sv) ; T_in2_un <= UNSIGNED(T_in2_sv) ; </P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297373">
</A>
sensor_un <= UNSIGNED(sensor_sv) ; D_sv <= STD_LOGIC_VECTOR(D_un) ; </P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297374">
</A>
v_1 : t_control <B CLASS="Keyword">
port</B>
<B CLASS="Keyword">
map</B>
</P>
<P CLASS="ComputerLabel">
<A NAME="pgfId=297375">
</A>
(T_in1_un,T_in2_un,sensor_un, Clk_core, rd_fifo_sv(0), reset_sv(0),D_un, oe_b) ;</P>
<P CLASS="ComputerLastLabel">
<A NAME="pgfId=297376">
</A>
<B CLASS="Keyword">
end</B>
;</P>
</TD>
</TR>
</TABLE>
<HR><P>[ <A HREF="CH12.htm">Chapter start</A> ] [ <A HREF="CH12.9.htm">Previous page</A> ] [ <A HREF="CH12.b.htm">Next page</A> ]</P></BODY>
<!--#include file="Copyright.html"--><!--#include file="footer.html"-->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?