Hi Leute Ich bin neu in VHDL programmieren und bräcuhte Hilfe beim
darstellen eines XNOR Gatters mit einem zuvor entworfenen 4:1 Mux.
Ich habe bereits eine struktur für mein xnor soll allerdings in der
Simbox dann diejenige verwenden, bei der der multiplexer mit im spiel
ist.
Bedeutet Ich soll die Konfiguration so ändern, dass die eq_structure
verwendet wird.
Ich weiß jedoch nicht genau wie man den Bereich initialisiert um das Mux
gate zu verwenden.
Jegliche Hilfe würde mich freuen.
MFG
1 | entity mux_gate is
|
2 | port(
|
3 | D0 ,D1 ,D2 ,D3 ,S0 ,S1 : in STD_LOGIC;
|
4 | Y : out STD_LOGIC
|
5 | );
|
6 | end mux_gate;
|
7 |
|
8 | architecture mux_behavior of mux_gate is
|
9 |
|
10 | begin
|
11 | P1:process(D0,D1,D2,D3,S0,S1)
|
12 | begin
|
13 | if (S0='0' and S1='0') then Y<=D0; elsif
|
14 | (S0='0' and S1='1') then Y<=D1; elsif
|
15 | (S0='1' and S1='0') then Y<=D2; else
|
16 | Y<=D3;
|
17 | end if;
|
18 | end process P1;
|
19 | end mux_behavior;
|
20 | .....
|
21 | .....
|
22 | .....
|
23 | entity eq_gate is
|
24 | port(
|
25 | in0,in1 : in STD_LOGIC;
|
26 | out0 : out STD_LOGIC
|
27 | );
|
28 | end eq_gate;
|
29 |
|
30 |
|
31 |
|
32 | architecture eq_dataflow of eq_gate is
|
33 |
|
34 | begin
|
35 | out0 <= (in0 and in1) or (not in0 and not in1);
|
36 | end eq_dataflow;
|
37 |
|
38 | architecture eq_structure of eq_gate is
|
39 | ????
|
40 | end eq_structure;
|