LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY LS138 IS
PORT ( S:in STD_LOGIC_vector(2 downto 0);
Y: out STD_LOGIC_vector(7 downto 0));
end LS138;
ARCHITECTURE mux_behave OF LS138 IS
begin
PROCESS(S) IS
BEGIN
CASE S IS
when "000"=>Y<=(0=>'0',OTHERS=>'1');
when "001"=>Y<=(1=>'0',OTHERS=>'1');
when "010"=>Y<=(2=>'0',OTHERS=>'1');
when "011"=>Y<=(3=>'0',OTHERS=>'1');
when "100"=>Y<=(4=>'0',OTHERS=>'1');
when "101"=>Y<=(5=>'0',OTHERS=>'1');
when "110"=>Y<=(6=>'0',OTHERS=>'1');
when "111"=>Y<=(7=>'0',OTHERS=>'1');
END CASE;
END PROCESS;
end mux_behave;
2. Use the formula
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY yimaqi138 IS
PORT (A,B,C:IN STD_LOGIC;
S1,notS2,notS3:IN STD_LOGIC;
Y0,Y1,Y2,Y3: out STD_LOGIC;
Y4,Y5,Y6,Y7: OUT STD_LOGIC);
End yimaqi138;
ARCHITECTURE mux_behave OF yimaqi138 IS
SIGNAL S:STD_LOGIC;
BEGIN
S<=S1 AND (NOT notS2) AND (NOT notS3);
Y0<=NOT(((NOT A)AND(NOT B)AND (NOT C)) AND S);
Y1<=NOT(((NOT A)AND (NOT B) AND C)AND S);
Y2<=NOT(((NOT A) AND B AND (not C))AND S);
Y3<=NOT(((NOT A) AND B AND C )AND S);
Y4<=NOT((A AND(NOT B)AND (NOT C))AND S);
Y5<=NOT((A AND (NOT B) AND C)AND S);
Y6<=NOT((A AND B AND (not C))AND S);
Y7<=NOT((A AND B AND C )AND S);
end mux_behave;
Previous article:VHDL Program for Half Adder
Next article:VHDL Program Implementation of 4-bit Carry Lookahead Adder 74LS283
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- CST Antenna Simulation and Engineering Design
- Build a car and drive to the distant land! Learn TI automotive reference designs and take a skills test to win prizes!
- EEWORLD University Hall----Rigol National Tour Seminar: Heartbeat, Infinite Possibilities
- How to use single chip microcomputer to read and write USB disk
- How to use the signal source to create the arbitrary waveform you want?
- Low-cost intelligent fire and theft alarm system
- 【ufun learning】Environment development and construction
- MSP430 - Timer_A timer interrupt program
- Max30102 heart rate blood oxygen sensor measuring heart rate problem
- 【Mil MYS-8MMX】Part 2: WIFI connection network