STDERR.puts"WARNING: Physical pin #{el[:number]} is used at the same time as an input and an output.\n Note that the pin state is NOT high impedence."ifel[:input]andel[:output]
abort"ERROR: Parsing error in file \"#{constraintFile}\":\n\"#{line.chomp}\""ifmatch.nil?
sigName=match[1]
ifmatch[2]then
fromMsbBit=match[3].to_i
ifmatch[4]then
...
...
@@ -111,14 +111,14 @@ module ArGen
fromMsbBit=nil
fromLsbBit=nil
end
toMsbBit=match[6].to_i
ifmatch[7]then
toLsbBit=match[8].to_i
else
toLsbBit=toMsbBit
end
iftoLsbBit>toMsbBitthen
tmp=toLsbBit
toLsbBit=toMsbBit
...
...
@@ -126,7 +126,7 @@ module ArGen
end
abort"ERROR: In file \"#{constraintFile}\": index cannot be negative\n\"#{line.chomp}\""iftoLsbBit<0
abort"ERROR: In file \"#{constraintFile}\": IO constraint location not in the architecture (#{@vFpgaNbIoPins} inputs and #{@vFpgaNbIoPins} outputs)\n\"#{line.chomp}\""iftoLsbBit>=@vFpgaNbIoPins
iffromMsbBit.nil?then
fromMsbBit=toMsbBit-toLsbBit
end
...
...
@@ -139,11 +139,11 @@ module ArGen
fromMsbBit=tmp
end
abort"ERROR: In file \"#{constraintFile}\": index cannot be negative\n\"#{line.chomp}\""iffromLsbBit<0
abort"ERROR: Expecting \"K\" in \"clb\" in \"clbs\""unlessclbArr[4][0]==:K
abort"ERROR: Expecting the CLB's BLE's LUT's number of input in \"K\" in \"clb\" in \"clbs\""unlessclbArr[4][1].kind_of?(Integer)
clbK=clbArr[4][1]
## CLB Routing ##
abort"ERROR: Expecting \"clbRouting\" in \"clb\" in \"clbs\""unlessclbArr[5][0]==:clbRouting
interfacesArray=clbArr[5][1..-1]
clbRoutings={}
interfacesArray.eachdo|interfaceArray|
## Interface name ##
...
...
@@ -109,7 +109,7 @@ module ArGen
abort"ERROR: Expecting the interface name in \"interface\" in \"clbRouting\" in CLB \"#{clbName}\" in \"clbs\""unlessinterfaceArray[1].class==String
interfaceName=interfaceArray[1]
abort"ERROR: In \"interface\" in \"clbRouting\" in CLB \"#{clbName}\" in \"clbs\": an interface name shall not have a space or a dot (#{interfaceName})"unless(/\s|\./=~interfaceName).nil?
## Inputs ##
clbInputs=Array.new(clbI)
abort"ERROR: Expecting \"inputs\" in interface \"#{interfaceName}\" in \"clbRouting\" in CLB \"#{clbName}\" in \"clbs\""unlessinterfaceArray[2][0]==:inputs
abort"ERROR: Expecting the number of IO in IO block \"#{ioBlockName}\""unlessioArr[2].kind_of?(Integer)
numIos=ioArr[2]
## IOs ##
abort"ERROR: Expecting \"ios\" in IO block \"#{ioBlockName}\""unlessioArr[3][0]==:ios
iosArr=ioArr[3][1..-1]
...
...
@@ -186,39 +186,39 @@ module ArGen
ioIndex=ioDefArr[1]
abort"ERROR: IO index (#{ioIndex}) is superior to the number of IOs (#{numIos}) in IO block \"#{ioBlockName}\""unlessioIndex<numIos
abort"ERROR: IO index (#{ioIndex}) is defined twice in IO block \"#{ioBlockName}\""unlessios[ioIndex].nil?
abort"ERROR: Expecting \"inputConnectTo\" in IO #{ioIndex} of IO block \"#{ioBlockName}\""unlessioDefArr[2][0]==:inputConnectTo
ioInputs=ioDefArr[2][1..-1]
ioInputs.eachdo|ictnum|
abort"ERROR: Expecting an input wire index in \"inputConnectTo\" in IO #{ioIndex} of IO block \"#{ioBlockName}\""unlessictnum.kind_of?(Integer)andictnum>=0
abort"ERROR: Input wire index (#{ictnum}) is greater than the routing channel width (#{w}) in IO #{ioIndex} of IO block \"#{ioBlockName}\""unlessictnum<w
end
abort"ERROR: Expecting \"outputConnectTo\" in IO #{ioIndex} of IO block \"#{ioBlockName}\""unlessioDefArr[3][0]==:outputConnectTo
ioOutputs=ioDefArr[3][1..-1]
ioOutputs.eachdo|octnum|
abort"ERROR: Expecting an output wire index in \"outputConnectTo\" in IO #{ioIndex} of IO block \"#{ioBlockName}\""unlessoctnum.kind_of?(Integer)andoctnum>=0
abort"ERROR: Output wire index (#{octnum}) is greater than the routing channel width (#{w}) in IO #{ioIndex} of IO block \"#{ioBlockName}\""unlessoctnum<w
abort"ERROR: In automatic layout: If any of the IO blocks \"top\", \"bottom\", \"left\" and \"right\" is not defined then you must define a \"default\" IO block"
abort"ERROR: Expecting a switch box name in \"switchBox\" in \"switchBoxes\""unlesssbxArr[1].class==String
sbxName=sbxArr[1]
connArr=sbxArr[2..-1]
muxes=[]
ifconnArr.length==1andconnArr[0]==:autothen
abort"ERROR: In \"switchBoxes\": switch box \"#{sbxName}\" is used as 'auto', but automatic connexion works only with \"left\", \"right\" and \"bottom\""ifsbxName!='left'andsbxName!='right'andsbxName!='bottom'
topSwBx=sbxes['top']
abort"ERROR: In \"switchBoxes\": switch box \"#{sbxName}\" is used as 'auto', but to use automatic connexion you must have previously defined a \"top\" switch box"iftopSwBx.nil?