Description: ENTITY maj IS
PORT(a,b,c : IN BIT m : OUT BIT)
END maj
--Dataflow style architecture
--Behavioural style architecture using a look-up table
ARCHITECTURE using_table OF maj IS
BEGIN
PROCESS(a,b,c)
CONSTANT lookuptable : BIT_VECTOR(0 TO 7) := "00010111"
VARIABLE index : NATURAL
BEGIN
index := 0 --index must be cleared each time process executes
IF a = 1 THEN index := index+ 1 END IF
IF b = 1 THEN index := index+ 2 END IF
IF c = 1 THEN index := index+ 4 END IF
m <= lookuptable(index)
END PROCESS
END using_table
------------------3,5,6,7 is 1 so 110 101 011 111 is 1
To Search:
File list (Check if you may need any files):
4v2\maj.qpf
...\maj.qsf
...\db\mux_ldc.tdf
...\..\maj.db_info
...\..\maj.sgdiff.hdb
...\..\maj.sim.qmsg
...\..\maj.sim.hdb
...\..\maj.fit.qmsg
...\..\wed.zsf
...\..\maj.map.cdb
...\..\maj.map.hdb
...\..\maj.cmp.rdb
...\..\maj.cmp.logdb
...\..\maj.cmp.kpt
...\..\maj.cbx.xml
...\..\maj.hif
...\..\maj.hier_info
...\..\maj.rpp.qmsg
...\..\maj.sgate.rvd
...\..\maj.sld_design_entry.sci
...\..\maj.cmp0.ddb
...\..\maj.cmp.cdb
...\..\maj.asm.qmsg
...\..\maj.cmp.hdb
...\..\maj.tan.qmsg
...\..\maj.psp
...\..\maj.dbp
...\..\maj.signalprobe.cdb
...\..\maj.cmp.tdb
...\..\maj.eco.cdb
...\..\maj.sgate_sm.rvd
...\..\maj.fnsim.cdb
...\..\maj.syn_hier_info
...\..\maj.fnsim.qmsg
...\..\maj.eds_overflow
...\..\maj.fnsim.hdb
...\..\maj.sim.vwf
...\..\maj.sim.rdb
...\..\maj.sld_design_entry_dsc.sci
...\..\maj.map.qmsg
...\..\maj.rtlv_sg.cdb
...\..\maj.rtlv.hdb
...\..\maj.rtlv_sg_swap.cdb
...\..\maj.pre_map.hdb
...\..\maj.pre_map.cdb
...\..\maj.map.logdb
...\..\maj.sgdiff.cdb
...\db
...\maj.vhd
...\maj.map.rpt
...\maj.flow.rpt
...\maj.map.summary
...\maj.done
...\maj.pin
...\maj.fit.rpt
...\maj.fit.smsg
...\maj.fit.summary
...\maj.asm.rpt
...\maj.tan.summary
...\maj.tan.rpt
...\maj.vwf
...\maj.sim.rpt
...\maj.qws
4v2