Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20754 Discussions

[AHDL] Problem with MUX

Altera_Forum
Honored Contributor II
1,991 Views

I am a newbie to Quartus and AHDL. I have problem with multiplexer 3 in 1 out. When I simulate I get for 0 and 1 signal A, for 2 signal B, for 3 signal C. 

 

SUBDESIGN mux_3_8bit_1 ( A, B, C : INPUT; -- wejscia 8 bitowe - sygnaly w kodzie BCD s : INPUT; -- sygnaly sterujace Y : OUTPUT; -- sygnal wyjsciowy ) BEGIN CASE s IS WHEN 0 => Y = A; WHEN 1 => Y = B; WHEN 2 => Y = C; WHEN 3 => Y = B"00000000"; END CASE; END;  

Maybe someone culd help me?
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
831 Views

Looks ok to mean - you sure its not a problem elsewhere? 

 

Other than that - Id recommend not using AHDL anymore. Move to VHDL or Verilog instead. AHDL simulation is only supported in the quartus simulator, which wont exist for new versions of quartus.
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

I must use AHDL, because this is requirment of project. 

 

During simulation i get a lot of warning. for example: 

 

 

--- Quote Start ---  

Warning: Found glitch at time 0.5 ns of duration 0.5 ns on node "|mux_3_8bit_1|A[0]" 

... 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

Exolten-one, you probably have glitch-detect turned on. See Assignments->Settings-->Simulation Verification 

 

Tricky, you do mean that the Quartus internal simulator is going to disappear?
0 Kudos
Altera_Forum
Honored Contributor II
831 Views

josyb, You are right. When I turne off glitch-detect warnings disapear, but timings are shifted.

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

This is what I simulated, looks very plausible to me

0 Kudos
Altera_Forum
Honored Contributor II
831 Views

In my simulation looks that 

 

Thanks all for help. Problem concerned project. When I make new project problem have disapered.
0 Kudos
Reply