Tuesday, January 23, 2024

XC95108 VHDL LED Blinking

The XC95108 is a high-performance CPLD providing advanced in-system programming and test capabilities for general purpose logic integration. It is comprised of six 36V18 Function Blocks, providing 2,400 usable gates with propagation delays of 7.5 ns. It has a 5V in-system programmable (ISP) that allow us to program/erase up to 10000 cycles.

XC95108 VHDL LED Blinking
The XC9572 XC95108 Prototype Board

XC95108 VHDL LED Blinking
XC95108 Architecture

We can design the circuit using schematic tool, VHLD, or Verilog using Xilinx ISE. The ISP tool could be a legacy parallel port cable (II) or even a modern USB JTAG.

In this introductory example, I design a frequency divider circuit using VHDL. The frequency source is driven from a 25.175MHz crystal oscillator. The output frequency is 1Hz that will drive an output LED.

  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date: 13:53:19 01/23/2024
  6. -- Design Name:
  7. -- Module Name: led_blink - Behavioral
  8. -- Project Name:
  9. -- Target Devices:
  10. -- Tool versions:
  11. -- Description:
  12. --
  13. -- Dependencies:
  14. --
  15. -- Revision:
  16. -- Revision 0.01 - File Created
  17. -- Additional Comments:
  18. --
  19. ----------------------------------------------------------------------------------
  20. library IEEE;
  21. use IEEE.STD_LOGIC_1164.ALL;
  22.  
  23. -- Uncomment the following library declaration if using
  24. -- arithmetic functions with Signed or Unsigned values
  25. --use IEEE.NUMERIC_STD.ALL;
  26.  
  27. -- Uncomment the following library declaration if instantiating
  28. -- any Xilinx primitives in this code.
  29. --library UNISIM;
  30. --use UNISIM.VComponents.all;
  31.  
  32. entity led_blink is
  33. Generic ( FREQ : INTEGER :=25175000;
  34. FREQ_H: INTEGER :=12587500);
  35. Port ( CLK : in STD_LOGIC;
  36. LED : out STD_LOGIC);
  37. end led_blink;
  38.  
  39. architecture Behavioral of led_blink is
  40. SIGNAL TOGGLE: STD_LOGIC;
  41. begin
  42.  
  43. LED<=TOGGLE;
  44.  
  45. PROCESS(CLK)
  46. VARIABLE COUNTER: INTEGER RANGE 0 TO FREQ;
  47.  
  48. BEGIN
  49. if(CLK'EVENT AND CLK='1') THEN COUNTER:=COUNTER+1; END IF;
  50. if(COUNTER>=FREQ_H) THEN
  51. TOGGLE<= TOGGLE XOR '1';
  52. COUNTER:=0;
  53. END IF;
  54.  
  55. END PROCESS;
  56.  
  57. end Behavioral;
  58.  
  59.  

I use VHDL Generic to parameterize the design, conferring the code more flexibility and flexibility.

This VHDL code could fit an XC9572 CPLD. But this chip is not currently available at my workshop.

XC95108 VHDL LED Blinking
XC95108 PLCC-84

I use an XC95108 PC84 (PLCC-84) with socket. Its speed grade is 20 Nano seconds.

XC95108 VHDL LED Blinking
Xilinx Impact ISP

I still use the Xilinx Parallel Cable III to program this old CPLD. Its operating speed is slower than a modern USB JTAG.

Click here to download this VHDL example.


No comments:

Post a Comment

Labels

ADC (10) Analog (14) Arduino (12) Atmega16 (19) Audio (2) AVR (20) Charger (1) Cortex-M0 (1) Counter (10) CPLD (25) Digital I/O (22) Display (34) EEPROM (2) Environment Sensor (1) esp8266 (2) Experiment Board (10) I2C (4) Interrupt (7) LCD (1) LDmicro (29) measurement and instrumentation (7) Microchip Studio (3) MikroC (1) One-Shot (3) OpAmp (1) PCB (31) PIC16 Microcontrollers (16) PIC16F877A (2) PIC16F887 MikroC (22) PLC (35) PWM (11) Regulator (1) RTC (2) Sensor (8) Shift Registers (5) SPI (5) Timer (34) UART (2) ultra-sonic sensor (1) USB (1) VHDL (21) xc8 (1) XC95108 (9) XC9536 (15) XC9572 (1) Xilinx (23) Xilinx ISE (22)