ZKX's LAB

vhdl串并转换原理 用vhdl语言实现8位并转串电路和串转并电路,求大神指导!!急用!!

2020-08-11知识13

串并转换,是通过什么原理实现的啊?比如把并行数据转换成串行数据:将四个码元周期均为4s的并行数字信号进行并—串转换,转换后,在一个周期(4s)内,将有4个码元被串行。用vhdl语言实现8位并转串电路和串转并电路,求大神指导!!急用!! library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity sc isport(clk,rxd:in std_logic;data:out std_logic_vector(7 downto 0));end sc;architecture rt8251 of sc issignal count:std_logic_vector(3 downto 0):=\"0000;signal do_latch:std_logic_vector(7 downto 0);signal d_fb:std_logic_vector(9 downto 0);signal rxdf:std_logic;signal rdfull:std_logic:='0';begindata;P1:process(clk)beginif(clk'event and clk='1')thenif((rxdf='1')and(count=\"1000\"))thendo_latch(7 downto 0)(7 downto 0);rdfull;end if;end if;end process p1;p2:process(clk)beginif(clk'event and clk='1')thenif(rxd='0')thenrxdf;elsif((rxdf='1')and(count=\"1000\"))thenrxdf;end if;end if;end process p2;p3:process(clk)variable scir:integer range 0 to 8;variable scis:std_logic_vector(3 downto 0);beginif(clk'event and clk='1')thenif(rxdf='1')thenscir:=scir+1;elsescir:=0;end if;end if;scis:=conv_std_logic_vector(scir,4);count;end process p3;p4:process(clk)begincase count iswhen。基于vhdl的串并转换器 首先,用变量时最好初始化一下variable t:std_logic_vector(2 downto 0):=\"000;要不一开始输出是个不确定值。还有就是这段写得不规范,改一下if clk'event and clk='1' thenif i=3 thenDout3(2);Dout2(1);Dout1(0);i:=0;elset(2 downto 0):=t(1 downto 0)&din;i:=i+1;end if;end if;串并转换是要实现什么功能? 串并转换,是通过VHDL语言原理实现,将一条信息流(假如有8bits)分成两路信号的话,两路同时传输,时间就是原来时间的一半。串并转换定义:把一个连续信号元序列变换成为表示相同信息的一组相应的并行出现的信号元的过程。串并转换应用学科:通信科技(一级学科),通信原理与基本技术(二级学科)。求一串并(3位)转换模块参考VHDL源程序; library IEEE;use IEEE.STD_LOGIC_1164.ALL;entity serial2parallel is Port(clk,rst:in STD_LOGIC;serial_in:in STD_LOGIC;parallel_out:out STD_LOGIC_VECTOR(2 downto 0。

#quartus#vhdl语言#原理图#vector#vhdl

随机阅读

qrcode
访问手机版