easton 发表于 2006-2-22 21:58

[求助][求助]matlab里有没有“多路复用”block啊?比如TDMA?

<STRONG>[求助]matlab里有没有“多路复用”block啊?比如TDMA?</STRONG>

happy 发表于 2006-2-23 09:34

回复:(easton)[求助][求助]matlab里有没有“多路复...

<P>参考下面的自己写一个吧<BR><BR>采用block构造8对1多路复用器</P>
<P>--*********************************************************<BR>--* 8 To 1 Multiplexer(BLOCK)<BR>--* Two 4 to 1 mul and One 2 to 1 Mul<BR>--*Filename: block1<BR>--*********************************************************<BR>library ieee;<BR>use ieee.std_logic_1164.all;</P>
<P>entity block1 is<BR>port(I:instd_logic_vector(7 downto 0);<BR>S:instd_logic_vector(2 downto 0);<BR>Y:outstd_logic);<BR>end block1;</P>
<P>architecture arch of block1 is<BR>signalX:std_logic_vector(1 downto 0);<BR>begin<BR>mul4_1:block<BR>begin<BR>process(S,I)<BR>begin<BR>if S(1 downto 0) = "00" then<BR>X(0)&lt;=I(0);<BR>elsif S(1 downto 0) = "01" then<BR>X(0)&lt;=I(1);<BR>elsif S(1 downto 0)="10" then<BR>X(0)&lt;=I(2);<BR>else<BR>X(0)&lt;=I(3);<BR>end if;<BR>end process;<BR>end block mul4_1;</P>
<P>mul4_2:block<BR>begin<BR>process(S,I)<BR>begin<BR>case S(1 downto 0) is<BR>when "00" =&gt; X(1)&lt;=I(4);<BR>when "01" =&gt; X(1)&lt;=I(5);<BR>when "10" =&gt; X(1)&lt;=I(6);<BR>when others =&gt; X(1)&lt;=I(7);<BR>end case;<BR>end process;<BR>end block mul4_2;</P>
<P>mul2:block<BR>begin<BR>process(S,X)<BR>begin<BR>if S(2) = '0' then<BR>Y &lt;= X(0);<BR>else<BR>Y &lt;= X(1);<BR>end if;<BR>end process;<BR>end block mul2;<BR>end arch; <BR></P>

Chris_yxl 发表于 2006-4-4 14:24

多路复用的模块!

simulink<BR>   signal routing<BR>         mux      复用<BR>         demux    解复用<BR><BR>可以试试
页: [1]
查看完整版本: [求助][求助]matlab里有没有“多路复用”block啊?比如TDMA?