A-C4E10 Cyclone IV FPGA EP4CE10E22C8N Development Board

From blwiki
Jump to: navigation, search

A-C4E10 Card 002.PNG

A-C4E10 Card 001.PNG

EP4CE10 Device List .jpg

I/O Connector

A4CExx IO CONN.PNG

Programming the MPS16 Flash

  • This card has a single JTAG connector for code download
  • The card can be temporarily or permanently changed - but it's done with some special methods
    • Temporary programming does not persist after power cycling (or reset) (Stored in RAM
    • Permanent programming requires downloading the FPGA into the attached Serial EEPROM
  • The process to permanently program the EEPROM is more complicated
    • This is attempt to document the steps I took to make it work (this card uses EP4CE10E22C8 part)

EP4-Programming.PNG

Create sof file

  • In Quartus create code
  • Device: EP4CE10E22C8
  • Compile the part
    • Processing > Start Compile
  • This results in a .sof file
    • .sof file is an sram download which puts the logic into the FPGA but does not store it permanently in the EEPROM

Create jic file

  • Ap Note on this process
  • Convert .sof file to .jic file
    • jic file is a JTAG Indirect Configuration file
      • jic file is downloaded through the FPGA into the EEPROM
      • File is brought through the FPGA which will be in a soft programming mode
    • File > Convert Programming File
    • If Conversion setup was previously saved then
      • Open Conversion Setup Data...
      • Select the file
      • If via this method then the next couple of steps can be skipped
    • If this is the first time then the next few steps need to be followed
    • Programming file type: JTAG Indirect Configuration file (.jic)
    • Configuration device: EPCS16
    • Set output file name
      • Make sure path is correct since the previous path seems to persist
  • Two "segments" in the Input Files to convert section
    • Flash Loader: EP4CE6
    • SOF Data: xxx.sof
  • Verify screen looks similar to this

Conv Prog File.PNG

  • Click Generate
    • Overwrite file (if needed)
  • Save Conversion Setup so you don't need to do this next time
  • Close

Program EEPROM

  • Back in Quartus Programmer
    • In Quartus select Program Device (Open Programmer)
  • Tools | Options
    • Select Use the enhanced mode Serial Flash Loader (SFL) IP for factory default helper image
  • Autodetect device
    • EP4CE10E22 shows up in preview window below
  • Select device by clicking on it
  • Right click on device
  • Edit
    • Attach flash device
    • Select Flash Device: EPCS16 (same as MPS16)
  • Click on EPCS16 and change file
  • Select Program/Configure box and the Factory default enhanced... line will appear
  • Select Start
  • Program Device with the setup below
  • If you did this before the screen is probably already correctly filled out
  • Note this has the FPGA on the card and the serial EEPROM shown as a connection from the FPGA
    • The FPGA has "Factory default enhanced SFL image" and is assigned to the EP4CE6
    • The .jic file which was created in the previous steps is assigned to the EPCS16
  • Mode should be JTAG since the connection to the card is via the one JTAG connector
  • Select Program/configure
    • The SFL image is a soft loader which lets the FPGA control the EEPROM
      • Should be EP4CE10E22C8 part

JIC File-5-Program.PNG

  • Start
  • The FPGA is left with only the Serial programmer
  • Remove power and repower up the card to have change take effect

Pin List

set_global_assignment -name DEVICE EP4CE10E22C8
set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
set_global_assignment -name USE_CHECKSUM_AS_USERCODE OFF
set_global_assignment -name RESERVE_ASDO_AFTER_CONFIGURATION "AS INPUT TRI-STATED"
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
set_global_assignment -name DEVICE_FILTER_PIN_COUNT 144
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE 8
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3 V"
# Clocks and resets
set_location_assignment PIN_23 -to CLK_50M
set_location_assignment PIN_24 -to CLK_USER
set_location_assignment PIN_86 -to rst
# VGA
set_location_assignment PIN_2 -to red
set_location_assignment PIN_1 -to grn
set_location_assignment PIN_144 -to blu
set_location_assignment PIN_143 -to vsync
set_location_assignment PIN_142 -to hsync
# Buzzer
set_location_assignment PIN_141 -to Buzzer
# Serial
set_location_assignment PIN_113 -to rxd
set_location_assignment PIN_114 -to txd
# I2C - 24C04 EEPROM
# PS/2 Keyboard
set_location_assignment PIN_11 -to KeyboardClk
set_location_assignment PIN_10 -to KeyboardData
# Buttons and LEDs
set_location_assignment PIN_87 -to key_data[1]
set_location_assignment PIN_91 -to key_data[2]
set_location_assignment PIN_90 -to key_data[3]
# Seven Segment Display
set_location_assignment PIN_138 -to en[7]
set_location_assignment PIN_137 -to en[6]
set_location_assignment PIN_136 -to en[5]
set_location_assignment PIN_135 -to en[4]
set_location_assignment PIN_133 -to en[3]
set_location_assignment PIN_132 -to en[2]
set_location_assignment PIN_129 -to en[1]
set_location_assignment PIN_128 -to en[0]
set_location_assignment PIN_114 -to rxd
set_location_assignment PIN_113 -to txd
set_location_assignment PIN_115 -to seg_data[7]
set_location_assignment PIN_119 -to seg_data[6]
set_location_assignment PIN_120 -to seg_data[5]
set_location_assignment PIN_121 -to seg_data[4]
set_location_assignment PIN_124 -to seg_data[3]
set_location_assignment PIN_125 -to seg_data[2]
set_location_assignment PIN_126 -to seg_data[1]
set_location_assignment PIN_127 -to seg_data[0]
set_location_assignment PIN_80 -to lowbit
# LCD
set_location_assignment PIN_85 -to rs
set_location_assignment PIN_99 -to rw
set_location_assignment PIN_100 -to en
set_location_assignment PIN_101 -to dat[0]
set_location_assignment PIN_103 -to dat[1]
set_location_assignment PIN_104 -to dat[2]
set_location_assignment PIN_105 -to dat[3]
set_location_assignment PIN_106 -to dat[4]
set_location_assignment PIN_110 -to dat[5]
set_location_assignment PIN_111 -to dat[6]
set_location_assignment PIN_112 -to dat[7]
# I/O Connector
set_location_assignment PIN_30 -to IOCON_01
set_location_assignment PIN_28 -to IOCON_02
set_location_assignment PIN_32 -to IOCON_03
set_location_assignment PIN_31 -to IOCON_04
set_location_assignment PIN_34 -to IOCON_05
set_location_assignment PIN_33 -to IOCON_06
set_location_assignment PIN_39 -to IOCON_07
set_location_assignment PIN_38 -to IOCON_08
set_location_assignment PIN_42 -to IOCON_11
set_location_assignment PIN_43 -to IOCON_12
set_location_assignment PIN_44 -to IOCON_13
set_location_assignment PIN_46 -to IOCON_14
set_location_assignment PIN_49 -to IOCON_15
set_location_assignment PIN_50 -to IOCON_16
set_location_assignment PIN_52 -to IOCON_19
set_location_assignment PIN_51 -to IOCON_20
set_location_assignment PIN_54 -to IOCON_21
set_location_assignment PIN_53 -to IOCON_22
set_location_assignment PIN_58 -to IOCON_23
set_location_assignment PIN_55 -to IOCON_24
set_location_assignment PIN_88 -to IOCON_27
set_location_assignment PIN_89 -to IOCON_28
# DIP Switch
set_location_assignment PIN_58 -to DIP_SW_1
set_location_assignment PIN_59 -to DIP_SW_2
set_location_assignment PIN_60 -to DIP_SW_3
set_location_assignment PIN_64 -to DIP_SW_4
set_location_assignment PIN_65 -to DIP_SW_5
set_location_assignment PIN_66 -to DIP_SW_6
set_location_assignment PIN_67 -to DIP_SW_7
set_location_assignment PIN_68 -to DIP_SW_8
# LEDs
set_location_assignment PIN_72 -to LED_D3
set_location_assignment PIN_73 -to LED_D4
set_location_assignment PIN_74 -to LED_D5
set_location_assignment PIN_80 -to LED_D6
set_location_assignment PIN_93 -to LED_D7
set_location_assignment PIN_84 -to LED_D8
set_location_assignment PIN_77 -to LED_D9
set_location_assignment PIN_76 -to LED_D10
set_location_assignment PIN_75 -to LED_D11
set_location_assignment PIN_71 -to LED_D12
set_location_assignment PIN_70 -to LED_D13
set_location_assignment PIN_69 -to LED_D14