Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17252 ディスカッション

LED circuit issue with CPLD and Quartus

CFabr1
初心者
3,200件の閲覧回数

Hi all,

I'm trying to implementing under Quartus this simple LED circuit (based on two D flip-flops) using a +5V CPLD (EPM7032)

 

LEDs_circuit_KiCad.jpg

As you can see, there are only three signals inputs to the flip-flops :

 

-LED which can be fixed HIGH or LOW

-CLK1 that can be fixed HIGH or asserted (duration is 2.5us)

-CLK2 that can be fixed HIGH or asserted (duration is 2.5us)

 

When LED signal is low and CLK1 (or CLK2) is asserted the not negated output goes LOW activating the LED which start to blink (I use LEDs with built-in oscillator).

Well, the circuit works well with TTL gates (74LS74 or 74HC74) but when I implement it under Quartus 12.1it does not work well because, when the only CLK2 is asserted and LED2 blinks, also LED1 starts to blink.Here's the Quartus schematics :

 

74LS74_Quartus.jpg

Which could be the problem?Perhaps I have to turn off some of the Quartus compiler settings (like Auto Global Clock).Thanks in advance for any help or advice.

0 件の賞賛
7 返答(返信)
sstrell
名誉コントリビューター III
3,184件の閲覧回数

What are OPT0/2 and OPT1/3 connected to for clocking?

Also, in an FPGA, this is not a typical design.  Normally you would just use a D flip-flop primitive or write code (Verilog or VHDL) to implement it.  I don't know if that has any affect, but it's something to consider.

ShengN_Intel
従業員
3,172件の閲覧回数

Hi,

 

The functionality of the Megafunction tested with no problem check the image attached.

While OPT02 is asserted, LED1_CATHODE will toggle. As OPT13 is not asserted, LED2_CATHODE will not toggle.

 

Thanks,

Best regards,

Sheng

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

 

CFabr1
初心者
3,161件の閲覧回数

Thanks for reply.The problem is that, when the only OPT13 is asserted both LEDs toggle while only LED2_CATHODE should actually toggle.

 

P.S.

OPT02 and OPT13 are coming from an old japanese computer.

ShengN_Intel
従業員
3,152件の閲覧回数

Hi,

 

Tested with no problem as well.

Check the image and folder attached.

 

Thanks,

Best regards,

Sheng

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

 

CFabr1
初心者
3,140件の閲覧回数

I see.

Anyway, OPT01 and OPT13 are active LOW signal so, normally they are fixed HIGH and then get asserted to LOW for 2.5us.As well as, LED_CATHODE1 and LED_CATHODE2 shoud be  fixed HIGH so that the LEDs will not blink because both anodes are wired to +5V thru 220 Ohm resistors.Therefore, the LEDs should blink only when LED_CATHODE1 and LED_CATHODE2 toggle to LOW.

sstrell
名誉コントリビューター III
3,124件の閲覧回数

These are positive edge-triggered flip-flops so the fact that the "clocks" are normally held high is not going to give you accurate behavior.  Perhaps you should be using the /Q outputs instead.

ShengN_Intel
従業員
2,905件の閲覧回数

Hi,


Do you have any further update or concern?


Thanks,

Best regards,

Sheng


返信