freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

硬件描述語言vhdl及其應用-文庫吧

2025-09-13 13:41 本頁面


【正文】 2 : syndrome port map(reset, clk, decin, synfb, syndout)。 u3 : bmexpand port map(reset, clk, syndout, tout, synout, lstsfe, bout)。 u4 : bmfftbuf port map(reset, clk, ctl255, synout, lstsfe, bmfo)。 u5 : ifft port map(reset, clk, ctlN1m1, ctlN1, ctl254, bmfo, iffto)。 u6 : fftobuf port map(reset, clk, ctlobf, iffto, fbo)。 u7 : decbuf port map(reset, clk, decin, dout)。 u8 : xor8 port map(fbo, dout, decout)。 end structural。 6 哈爾濱工業(yè)大學微電子中心 2020/11/23 21 二、如何寫優(yōu)化的 VHDL代碼 1. 數(shù)據(jù)類型 2. 并發(fā) /順序賦值語句 3. 小結 4. Process語句 5. 資源共享 6. 其它 哈爾濱工業(yè)大學微電子中心 2020/11/23 22 數(shù)據(jù)類型 Types Scalar File Access Composite Array Record Enumerated Real Integer Physical 哈爾濱工業(yè)大學微電子中心 2020/11/23 23 數(shù)據(jù)類型 (Cont.) 標準數(shù)據(jù)類型 : bit, bit_vector, std_ulogic, std_logic, std_logic_vector, boolean, integer, etc. 復合數(shù)據(jù)類型 : array, record, sub_type, new type 哈爾濱工業(yè)大學微電子中心 2020/11/23 24 賦值語句 i/ signal t, s : bit。 s = ?1?。 s = t。 ii/ signal c : bit_vector(0 to 3)。 signal d : bit_vector(3 downto 0)。 c = “1011”。 d = c。 ok ? c(0 to 3) = d(0 to 3) – ok? ! No!c(0) c(1) c(2) c(3) d(3) d(2) d(1) d(0) 哈爾濱工業(yè)大學微電子中心 2020/11/23 25 iii/ signal s, t, w, m : bit。 signal c : bit_vector(0 to 3)。 c = “1011”。 c = s amp。 t amp。 w amp。 m。 c = (?1?, ?0?, ?1?, ?1?)。 c = 3。 c = (0 ?1?, 1 s, 2 ?1?, 3 ?1?)。 Ok? No Ok 賦值語句 ( Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 26 iv/ signal a_vec : bit_vector(0 to 11)。 a_vec = B”1100_0011_0011_1100”。 a_vec = “1100001100111100”。 a_vec = X”C33C”。 a_vec = X”C3_3C”。 a_vec = “1100_0011_0011_1100”。 a_vec = “C33C”。 Ok? No! 賦值語句 ( Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 27 二進制 —B( Binary) 八進制 —O( Octal) 十六進制 —X( Hexadecimal) 位串中的進制表示: 十進制 —D( Decimal) ??? 十進制 ( ) No! 賦值語句 ( Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 28 v/ signal A, B, C : bit_vector(3 downto 0)。 C = A and B。 C = not A Ok? ?0‘ ?1‘ ?1‘ ?0‘ ?1‘ ?1‘ ?0‘ ?1‘ ?0‘ ?1‘ ?0‘ ?0‘ A = B = C = C(3) = A(3) and B(3)。 C(2) = A(2) and B(2)。 C(1) = A(1) and B(1)。 C(0) = A(0) and B(0)。 S 賦值語句 ( Cont.) K!?0‘ ?1‘ ?1‘ ?0‘ ?1‘ ?0‘ ?0‘ ?1‘ A = C = 哈爾濱工業(yè)大學微電子中心 2020/11/23 29 vi/ slice of array entity VHDL is port(A : in bit_vector(0 to 7)。 outp : out bit)。 end VHDL。 architecture E1 of VHDL is begin outp = A(5)。 end。 signal C : bit_vector(0 to 7)。 C(4) = ?1‘。 C(0 to 3) = ―1001‖。 賦值語句 ( Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 30 vii/ Composite data type type date is record year : integer range 1980 to 2030。 month : integer range 1 to 12。 day : integer range 1 to 30。 end record。 subtype bit8 is bit_vector(7 downto 0)。 賦值語句 ( Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 31 vii/ Composite data type signal weekday, today : date。 = 2020。 = 2。 = 14。 today = weekday。 賦值語句 ( Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 32 數(shù)據(jù)類型轉換 強類型語言: VHDL具有豐富的數(shù)據(jù)類型 , 不同類型的對象 ( 信號 、 變量 ) 不能直接賦值 經(jīng)常轉換的數(shù)據(jù)類型: std_logic, bit, std_ulogic, boolean, signed unsigned, std_logic_vector, bit_vector 數(shù)據(jù)類型轉換三種方法: 類型標記轉換法 、 函數(shù)轉換法和常數(shù)轉換法 哈爾濱工業(yè)大學微電子中心 2020/11/23 33 類型標記轉換法 std_logic and std_ulogic, std_logic_vector and signed std_logic_vector and unsigned integer and real等 signal a std_logic_vector(0 to 7)。 signal b unsigned(0 to 7)。 b = unsigned(a)。 數(shù)據(jù)類型轉換 (Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 34 函數(shù)轉換法 std_logic and bit std_ulogic and bit, boolean and bit, std_logic_vector and bit_vector integer and std_logic_vector/unsigned等 signal a std_logic_vector(0 to 7)。 signal b integer range 0 to 255。 a = to_stdlogicvector(X‖AF‖)。 b = conv_ingeter(a)。 數(shù)據(jù)類型轉換 (Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 35 type typeconv_type is array(std_ulogic‘low to std_ulogic‘high) of bit。 constant typeconv : typeconv_type := (?0‘ | ?L‘ = ?0‘, ?1‘ | ?H‘ = ?1‘, others = ?0‘)。 signal s : std_ulogic。 signal a : bit。 a = typeconv(s)。 常數(shù)轉換法 數(shù)據(jù)類型轉換 (Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 36 How to transform bit type to boolean type? signal bitty : bit。 signal booly : boolean。 booly = (bitty = ?1‘)。 Discussion 數(shù)據(jù)類型轉換 (Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 37 邏輯運算與關系運算 運算符 : and, or, not, xor, nand, nor =, /=, , =, , = Discussion: What is the result of the following relational statement? ―1000‖ ―1111‖ = ? false 哈爾濱工業(yè)大學微電子中心 2020/11/23 38 算術操作 運算符 : +, –, *, mod, /, rem 操作數(shù)類型 : std_logic_vector, integer, signed, unsigned 右操作數(shù)必須為 2的指數(shù)??! use 。 哈爾濱工業(yè)大學微電子中心 2020/11/23 39 算術操作( Cont.) signal a, b : std_logic_vector(3 downto 0)。 q1 = unsigned(a) + unsigned(b)。 q2 = unsigned(a) + signed(b)。 q3 = signed(a) + signed(b)。 q4 = a + b。 q5 = (?0? amp。 a) + b。 4bit 5bit 4bit 4bit 5bit 哈爾濱工業(yè)大學微電子中心 2020/11/23 40 連字符和聚集 連字符: concatenation operator 聚集: aggregates signal A, B : std_logic_vector(3 downto 0)。 signal C : std_logic_vector(7 downto 0)。 signal D : std_logic。 C = A amp。 B。 C(7) C(6) C(5) C(4) C(3) C(2) C(1) C(0) A B 哈爾濱工業(yè)大學微電子中心 2020/11/23 41 C(7) = ?Z?。 C(6 downto 3) = A。 C(2 downto 0) = ?0? amp。 A(1 downto 0)。 C = (7 = ?1?, 6 = D, 5 downto 2 = ?1?, others = ?0?)。 C = “00000000”。 初始化 C = (others = ?0?)。 連字符和聚集 (Cont.) 哈爾濱工業(yè)大學微電子中心 2020/11/23 42 并發(fā) /順序賦值語句 并發(fā)賦值語句在 architecture的 begin和 end之間 ,與書寫順序無關 , 每一條并發(fā)語句均可用一個process語句等價 順序賦值語句只能在 process和子程序的 begin和end之間 , 它除信號賦值語句外 , 還有變量賦值 哈爾濱工業(yè)大學微電子中心 2020/1
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1