No.29578 作者:tyrone 邮件: ID:7271 登陆:5次 QQ:55840509 文章数:4篇 最后登陆IP:219.236.3.36 最后登陆:2004/7/13 9:20:44 注册:2002/12/7 12:54:00 财富:23 发帖时间:2003/5/11 15:26:38 发贴者IP:61.50.142.27 标题:tyrone:[原创] 摘要:No.29578[原创] 请问大虾: 下面是我的串并转换器的VHDL描述 library ieee; use ieee.std_logic_1164.all; package types is type state_type is (wait_for_start,read_bits,parity_error_detected,allow_read); subtype parrel_type is std_logic_vector(0 to 7); end types; ------------------------------------------------------------------- ------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use work.types.all; entity ser_par is port ( serial_in,clock,reset,rd : in std_logic; parity_error, allow_rd,allow_send: buffer std_logic; parallel_out : out std_logic_vector(7 downto 0) ); end ser_par; architecture fun of ser_par is signal current_state : state_type; signal current_position : integer range 7 downto 0; signal parity_in,parity_out : std_logic; signal parallel : std_logic_vector(7 downto 0); begin process(clock,reset,rd) begin wait until (clock'event and clock='1'); if(reset='1')then current_state <=wait_for_start; parallel_out <="00000000"; parallel <="00000000"; allow_rd <='0'; parity_error <='0'; current_position <=0; parity_in <='0'; parity_out <='0'; allow_send <='1'; else if(current_state=wait_for_start and rd='1')then current_position <=0; allow_rd <='0'; allow_send <='1'; parallel_out <="ZZZZZZZZ";----此处有错 parallel <="00000000"; parity_error <='0'; parity_in <='0'; ......
>>返回讨论的主题
|