translator.visitor.verilogVisitor.verilogWriteVisitor
index
/home/yentl/UA/devs-eindwerk/translator/translator/visitor/verilogVisitor/verilogWriteVisitor.py

 
Modules
       
os

 
Classes
       
translator.visitor.verilogVisitor.verilogVisitor.VerilogVisitor(builtins.object)
VerilogWriteVisitor

 
class VerilogWriteVisitor(translator.visitor.verilogVisitor.verilogVisitor.VerilogVisitor)
    Verilog Write Visitor takes a verilog module and translates it to writable elements
 
 
Method resolution order:
VerilogWriteVisitor
translator.visitor.verilogVisitor.verilogVisitor.VerilogVisitor
builtins.object

Methods defined here:
__init__(self)
Constructor
addParameter(self, par)
When we define an input or an output, we need to append this to the parameterlist
checkSelectLine(self, selectLine, bits, outputList, numberedOutputs=False)
Checks if a plexer has a selectLine, if it has, it returns True
Otherwise it assigns "not specified" to all the output wires and returns False
getErrorSignal(self, bitNumber)
Gives an error signal back of bitNumber long
getFloatingSignal(self, bitNumber)
Gives an floating signal back of bitNumber long
getNumberLongStringOfChar(self, number, char)
Gives a string of char back of number long
getZeroSignal(self, bitNumber)
Gives an zero signal back of bitNumber long
handleExtenderWithoutInput(self, extender)
When an extender doesn't have an input, this function will be invoked to bind the output
hasInputs(self, hasInputs, outputName, outputBits)
If there are no inputs, we write to the outputs a non defined signal and return false
isOutputFloating(self, output, inputList)
If there is an input (from the required inputlist) that is not specified, we assign floating to the output
visit(self, element)
The visit function
visitArithmeticWithoutCarry(self, arithmetic)
If the element is an arithmetic without carry, we can use this function
visitBitAdder(self, arithmetic)
If the element is a bit adder, we can use this function
visitBitExtender(self, extender)
If the element is a bit extender, we can use this function
visitBitFinder(self, arithmetic)
If the element is a bit finder, we can use this function
visitBitSelector(self, plexer)
If the element is a bit selector, we can use this function
visitBufferGate(self, gate, gateName, control=False)
If the element is a buffer gate, we can use this function
visitCarryArithmetic(self, arithmetic)
If the element is a carry arithmetic, we can use this function
visitClock(self, clock)
If the element is a clock, we can use this function
visitCollidingWire(self, colliding)
If the element is a colliding wire, we can use this function
visitComparator(self, arithmetic)
If the element is a comparator, we can use this function
visitComparatorComplement(self, info, moduleString)
When we need a 2's complement comparator, we can use this function (gives a string (with the delcaration) back)
visitComparatorUnsigned(self, info, moduleString)
When we need an unsigned comparator, we can use this function (gives a string (with the delcaration) back)
visitConstant(self, constant)
If the element is a constant, we can use this function
visitCounter(self, counter)
If the element is a counter, we can use this function
visitDecoder(self, plexer)
If the element is a decoder, we can use this function
visitDemultiplexer(self, plexer)
If the element is a demultiplexer, we can use this function
visitFlipFlop(self, flipflop)
If the element is a flipflop, we can use this function
visitGate(self, gate)
If the element is a gate, we can use this function
visitImportedCircuit(self, circuit)
If the element is an imported circuit, we can use this function
visitInput(self, input)
If the element is an input, we can use this function
visitInputOnGate(self, gate, gateName)
If the element is an input on gate, we can use this function
visitMemory(self, memory)
If the element is a memory, we can use this function
visitModule(self, module)
If the element is a module, we can use this function
visitMultiplexer(self, plexer)
If the element is a multiplexer, we can use this function
visitNegatedGate(self, gate, operator)
If the element is a negated gate (example: nand, nor, ...), we can use this function
visitNegator(self, arithmetic)
If the element is a negator, we can use this function
visitNormalGate(self, gate, operator)
If the element is normal gate, we can use this function
visitOutput(self, output)
If the element is an output, we can use this function
visitPlexer(self, plexer)
If the element is a plexer, we can use this function
visitPriorityEncoder(self, encoder)
If the element is a priority encoder, we can use this function
visitRam(self, memory)
If the element is a ram, we can use this function
visitRandom(self, random)
If the element is a random, we can use this function
visitRegister(self, element)
If the element is a register, we can use this function
visitRegisterMemory(self, reg)
If the element is a register memory, we can use this function
visitResistingWire(self, resisting)
If the element is a resisting wire, we can use this function
visitRom(self, memory)
If the element is a rom, we can use this function
visitSeparateRam(self, memory)
If the element is a separate ram, we can use this function
visitShiftRegister(self, reg)
If the element is a shift register, we can use this function
visitShifter(self, arithmetic)
If the element is a shifter, we can use this function
visitSplitter(self, splitter)
If the element is a splitter, we can use this function
visitStandardRam(self, memory)
If the element is a standard ram, we can use this function
visitTransistor(self, transistor)
visitWire(self, wire)
If the element is a wire, we can use this function
writeAddOrSub(self, info, sign)
When we need a subtractor or adder (depends on the sign), we can use this function (gives a string (with the delcaration) back)
writeAdder(self, info)
When we need an adder, we can use this function (gives a string (with the delcaration) back)
writeAssignmentFlipFlop(self, info, moduleString)
When we need a flipflop, we can use this hulpfunction (gives a string (with the delcaration) back)
writeBitAdder(self, info)
When we need a bit adder, we can use this function (gives a string (with the delcaration) back)
writeBitExtender(self, info)
When we need a bit extender, we can use this function (gives a string (with the delcaration) back)
writeBitExtenderInputOrSign(self, info, moduleString, criteria)
When we need a bit extender who looks at an input or the sign, we can use this function (gives a string (with the delcaration) back)
writeBitFinder(self, info)
When we need a bit finder, we can use this function (gives a string (with the delcaration) back)
writeBitSelector(self, info)
When we need a bit selector, we can use this function (gives a string (with the delcaration) back)
writeBufferGate(self, info)
When we need a buffer gate, we can use this function (gives a string (with the delcaration) back)
writeComparator(self, info)
When we need a comparator, we can use this function (gives a string (with the delcaration) back)
writeConditionWith2Inputs(self, in1, value1, in2, value2)
Helps to write a string for a condition (the condition has normally 2 inputs, but it is possible that the inputs are not defined)
writeConditionWith2InputsBis(self, in1, value1, in2, value2)
Helps to write a string for a condition (the condition has normally 2 inputs, but it is possible that the inputs are not defined)
writeControlledInverterOrBufferGate(self, info, gate)
When we need a controller gate, we can use this function (gives a string (with the delcaration) back)
writeCountBits(self, name, inBits, outBits)
When we need a countBits module, we can use this function (gives a string (with the delcaration) back)
writeCounter(self, info)
When we need a counter, we can use this function (gives a string (with the delcaration) back)
writeDecoder(self, info)
When we need a decoder, we can use this function (gives a string (with the delcaration) back)
writeDecoderFloat(self, info, moduleString)
When we need a decoder with a three-state, we can use this function (gives a string (with the delcaration) back)
writeDecoderNotFloat(self, info, moduleString)
When we need a decoder withou three-state, we can use this function (gives a string (with the delcaration) back)
writeDemultiplexer(self, info)
When we need a demultiplexer, we can use this function (gives a string (with the delcaration) back)
writeDemultiplexerFloat(self, info, moduleString, notSelectedString)
When we need a demultiplexer with a three-state, we can use this function (gives a string (with the delcaration) back)
writeDemultiplexerNotFloat(self, info, moduleString, notSelectedString)
When we need a demultiplexer without three-state, we can use this function (gives a string (with the delcaration) back)
writeDivider(self, info)
When we need a divider, we can use this function (gives a string (with the delcaration) back)
writeFindHighestNumber(self, bitNumber, moduleString, toFind, other)
Find highest number    (the number we are searching for equals to find) (gives a string (with the delcaration) back)
writeFindLowestNumber(self, bitNumber, moduleString, toFind, other)
Find lowest number     (the number we are searching for equals to find) (gives a string (with the delcaration) back)
writeFlipFlop(self, info)
When we need a flipflop, we can use this function (gives a string (with the delcaration) back)
writeHulpFiles(self, helpModules, mapName)
When we need extra modules to specify none existing verilog gates (will be written in the same map), we can use this function
writeHulpFilesAlwaysCondition(self, inputNumber, inputName='in')
Helps to write always @ condition of a hulp file (we check whether a value of an input changes)
writeHulpFilesHeading(self, componentName, inputNumber, outputNumber)
Helps to write the heading of a hulp file
writeHulpFilesParameter(self, inputNumber, inputBit, outputNumber, outputBit, reg=False)
Helps to declare the parameters of the hulp file
writeListOfElementsIntoString(self, list)
When we need to write a list of elements, we can use this function
writeMultiplexer(self, info)
When we need a multiplexer, we can use this function (gives a string (with the delcaration) back)
writeMultiplier(self, info)
When we need a multiplier, we can use this function (gives a string (with the delcaration) back)
writeMultyBitFromOneBitGate(self, nameGate, inputNumber, inputBit, outputNumber, outputBit, controlBit=0)
Uses gates that are defined for width 1 bit and combines them into a multy width bit
writeMultyBitFromOneBitGateOneOutput(self, nameGate, inputNumber, inputBit, controlBit)
Uses gates that are defined for width 1 bit and combines them into a multy width bit
writeNegator(self, info)
When we need a negator, we can use this function (gives a string (with the delcaration) back)
writeNotOneInputOn(self, info)
When we need a not one input on gate, we can use this function (gives a string (with the delcaration) back)
writeOneBitNotOrOneInputOn(self, nameGate, info, invert=False)
When we need a not one input on or one input on gate, we can use this function (gives a string (with the delcaration) back)
writeOneInputOn(self, info)
When we need a one input on gate, we can use this function (gives a string (with the delcaration) back)
writePriorityEncoder(self, info)
When we need a priority encoder, we can use this function (gives a string (with the delcaration) back)
writeRandom(self, info)
When we need a random, we can use this function (gives a string (with the delcaration) back)
writeRegisterMemory(self, info)
When we need a register memory, we can use this function (gives a string (with the delcaration) back)
writeResistingWire(self, info)
When we need a resisting wire, we can use this function (gives a string (with the delcaration) back)
writeShiftArithmeticRight(self, info, moduleString)
When we need an arithmetic right shifter, we can use this function (gives a string (with the delcaration) back)
writeShiftLogicalLeft(self, info, moduleString)
When we need a logical left shifter, we can use this function (gives a string (with the delcaration) back)
writeShiftLogicalRight(self, info, moduleString)
When we need a logical right shifter, we can use this function (gives a string (with the delcaration) back)
writeShiftRegister(self, info)
When we need a shift register, we can use this function (gives a string (with the delcaration) back)
writeShiftRollLeft(self, info, moduleString)
When we need a roll left shifter, we can use this function (gives a string (with the delcaration) back)
writeShiftRollRight(self, info, moduleString)
When we need a roll right shifter, we can use this function (gives a string (with the delcaration) back)
writeShifter(self, info)
When we need a shifter, we can use this function (gives a string (with the delcaration) back)
writeSignalChanger(self, changer)
writeSplitter(self, info)
When we need a splitter, we can use this function (gives a string (with the delcaration) back)
writeSplitterBigInput(self, splitter)
When we need a splitter (the splitters big wire is an input), we can use this function (gives a string (with the delcaration) back)
writeSplitterBigOutput(self, splitter)
When we need a splitter (the splitters big wire is an output), we can use this function (gives a string (with the delcaration) back)
writeSubtractor(self, info)
When we need a subtractor, we can use this function (gives a string (with the delcaration) back)
writeSum(self, moduleName, inputNumber, inBits, outBits)
When we need a sum module, we can use this function (gives a string (with the delcaration) back)
writeToFiles(self, mapName='resultModule/')
Opens a file in the specified map and writes the verilog code

Data descriptors inherited from translator.visitor.verilogVisitor.verilogVisitor.VerilogVisitor:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
ceil(...)
ceil(x)
 
Return the ceiling of x as an int.
This is the smallest integral value >= x.