################################################################################
# Default Script for Lattice ISP Lever bitgen (Bit Generation)
# You can comment any line using a # character to disable the option
# The .Replace* strings denote stings that will be replaced by the system
# to disable this feature just delete the string and replace it with the
# desired hardcoded value
# Any <value> needs to be udpated manually by the user.  They can be replaced
# with a .Replace* string alternatively.  These values are used for the
# modular design process and are not needed for Altium Designer flows.
################################################################################

################################################################################
# Don't Run DRC (Design Rules Checker)
################################################################################
.ReplaceSKipDRC -d

################################################################################
# Do not create a bitstream file. 
################################################################################
# -j

################################################################################
# Create a "rawbits" (.rbt) file instead of a binary file.
# Do not use -b with -m if you want both a rawbits file and a mask file (see the
# -m command below). Instead run BITGEN twice once with the -b option and once
# with the -m option. 
################################################################################
-b

################################################################################
# Overwrite an existing .bit, .msk, or .rbt output file. 
################################################################################
# -w

################################################################################
# Create a mask file. Format value equal 0 or 1. The value 0 is the ASCII
# format, 1 is binary. (Options vary between Architectures. Description is for 
# EC/ECP devices.
################################################################################
# -m 0

################################################################################
# Byte mirror. Swaps 0s with 7s, etc.
################################################################################
# -x

################################################################################
# Set ORCA configuration options. Options and values are case-insensitive. 
# Available options are:
################################################################################
# CFGMODE - Options are Disable, Flowthrough, Bypass
# -g CFGMODE:Flowthrough

# DonePin - Options are Pullup and Active.
# -g DonePin:Active

# OscSetting - MHz2_5, MHz4_3, MHz5_4, MHz6_9, MHz8_1, MHz9_2,
# MHz10, MHz13, MHz15, MHz20, MHz26, MHz30, MHz34,
# MHz41, MHz45, MHz51, MHz55, MHz60, MHz130
# -g OscSetting:MHz2_5

# ReadCapture - Enable or disable readback of the configuration bitstream. 
# Settings are Disable, Enable
# -g ReadCapture:Enable

# RamCfg - Options are Reset (default) and NoReset. Reset reinitializes the 
# device when you download bitstream. No reset retains the current configuration
# and allows additional bitstream configuration.
# -g RamCfg:NoReset

# Secuirty - Off, On
# -g Secuirty:On

# DONEPHASE           T3, T2, T1, T0
# -g DONEPHASE:T3
# GOEPHASE            T1, T3, T2
# -g GOEPHASE:T1
# GSRPHASE            T2, T3, T1
# -g GSRPHASE:T2
# GWDPHASE            T2, T3, T1
# -g GWDPHASE:T2
# SYNEXTDONE          Yes,  No
# -g SYNEXTDONE:Yes
# SYNSRC              No,   Yes
# -g SYNSRC:No
# PLLSET              NONE, UL, UR, LL, LR
# -g PLLSET:None
# PERSIST             No,   Yes
# -g PERSIST:No
# ES                  No,   Yes
# -g ES:No


# JTAG - Enables or disables JTAG (boundary scan) after configuration. Settings
# are Enable and Disable (default).
# -g JTAG:Enable


################################################################################
# JTAG setup. Allows the user to set JTAG port read and write on the FPGA chip
# by providing them with the setup bitstreams. Users will use tools other than
# ORCA Foundry to download these bitstreams. 
# -J r generates a JTAG read setup bitstream.The default output is jtagread.jbt.
# -J w generates JTAG write setup bitstream.
# The example syntax for JTAG setup will generate JTAG write setup bitstream that
# specifies infile1.ncd as the target design to be downloaded, so the correct
# initialization bits will be added to the bitstream. If more than one design is
# on the command line, the bitstreams for daisy-chained devices will be generated
# using JTAG port. The default output is infile1.jbt.
# Syntax: [-J w <infile1.ncd> {<infile2.ncd>}] [-J r] [-a] [-o <outfile>] 
################################################################################
# -J w
# -J r


################################################################################
# Input file
################################################################################
.ReplaceInputFile


################################################################################
# Preference file
################################################################################
.ReplacePreferenceFile