Documentation ¶
Index ¶
- Constants
- func AllInit(gornum int)
- func AllWait()
- func Assembly_2_Processor(rsize int, asmcode []string) (*procbuilder.Machine, error)
- func MultiAsm2BondMachine(rsize int, aafile *Abs_assembly) (*bondmachine.Bondmachine, error)
- func Needed_bits(num int) int
- func Same_Type(t1 *VarType, t2 *VarType) bool
- func Sequence_to_0(start string) ([]string, uint8)
- func Void(interface{})
- type Abs_assembly
- type BondgoCheck
- func (bg *BondgoCheck) Create_Bondmachine(rsize int, filter string) (*bondmachine.Bondmachine, *bondmachine.Residual, error)
- func (bg *BondgoCheck) Create_Connecting_Processor(rsize int, procid int) (*procbuilder.Machine, bool)
- func (bg *BondgoCheck) Create_Etherbond_Cluster(rsize int, extc *etherbond.Cluster) (*etherbond.Cluster, []uint32, []*bondmachine.Bondmachine, []*bondmachine.IOmap, ...)
- func (bg *BondgoCheck) Create_Udpbond_Cluster(rsize int, extc *udpbond.Cluster) (*udpbond.Cluster, []uint32, []*bondmachine.Bondmachine, []*bondmachine.IOmap, ...)
- func (bg *BondgoCheck) Expr_eval(n ast.Expr) ([]VarCell, bool)
- func (bg *BondgoCheck) Visit(n ast.Node) ast.Visitor
- type BondgoConfig
- type BondgoFunctions
- type BondgoMessages
- type BondgoRequirements
- func (bg *BondgoRequirements) Abstract_assembler(rsize int, asmcode []string, used chan UsageNotify) error
- func (reqmnt *BondgoRequirements) Dump_Requirements() string
- func (reqmnt *BondgoRequirements) Init_Requirements(cfg *BondgoConfig)
- func (reqmnt *BondgoRequirements) Usage_Monitor(useditem chan UsageNotify, usagedone chan bool)
- type BondgoResults
- func (rs *BondgoResults) Checker(proc_id int, ck string) bool
- func (rs *BondgoResults) CountLines(proc_id int) int
- func (rs *BondgoResults) GetProgram(proc_id int) []string
- func (rs *BondgoResults) Init_Results(cfg *BondgoConfig)
- func (rs *BondgoResults) Replacer(proc_id int, from string, to string)
- func (rs *BondgoResults) Shift_program_location(proc_id int, n int)
- func (rs *BondgoResults) WriteLine(proc_id int, line string)
- func (rs *BondgoResults) Write_assembly(proc_id int) string
- type BondgoRoutine
- type BondgoRuninfo
- type ChanInfo
- type ChanRequirements
- type FunctArg
- type FunctCell
- type IOInfo
- type IORequirements
- type Input
- type Output
- type ProcRequirements
- type SharedMemRequirements
- type SharedRAMInfo
- type UsageNotify
- type VarAns
- type VarCell
- type VarCells
- type VarReq
- type VarType
Constants ¶
View Source
const ( MAX_REGS = 65536 MAX_MEMORY = 65536 MAX_CHANNELS = 65536 MAX_INPUTS = 16 MAX_OUTPUTS = 16 MAXPEERID = uint32(10000) )
View Source
const ( TR_PROC = uint8(0) + iota TR_CHAN TR_SHAREDMEM TR_EXIT )
View Source
const ( C_OPCODE = uint8(0) + iota C_REGSIZE C_INPUT C_OUTPUT C_ROMSIZE C_RAMSIZE C_SHAREDOBJECT C_CONNECTED C_DEVICE )
View Source
const ( REQ_REMOVE = uint8(0) + iota // Removes the resoure from the local used list, if associated with a global one the global is never removed REQ_NEW // New variable request (and eventually attach to a global one) REQ_ATTACH // Attach a local var to a global one REQ_EXIT )
View Source
const ( ANS_OK = uint8(0) + iota ANS_FAIL )
View Source
const ( REGISTER = uint8(0) + iota MEMORY INPUT OUTPUT // Used only in assignment CHANNEL SHAREDMEMORY )
View Source
const ( T_NAMED = uint8(0) + iota T_CHAN T_STAR T_STRUCT )
View Source
const (
I_NIL = 0
)
View Source
const (
S_NIL = ""
)
Variables ¶
This section is empty.
Functions ¶
func Assembly_2_Processor ¶
func Assembly_2_Processor(rsize int, asmcode []string) (*procbuilder.Machine, error)
func MultiAsm2BondMachine ¶
func MultiAsm2BondMachine(rsize int, aafile *Abs_assembly) (*bondmachine.Bondmachine, error)
func Needed_bits ¶
func Sequence_to_0 ¶
Types ¶
type Abs_assembly ¶
type BondgoCheck ¶
type BondgoCheck struct { // The results *BondgoResults // The generated objects // Globally *BondgoConfig // Global compiler config *BondgoRequirements // The pointer to the requirements struct *BondgoRuninfo // Running data *BondgoMessages // Compiler messages and errors *BondgoFunctions // The map of declared functions in all scopes Used chan UsageNotify // Used to notify the used resource Reqs chan VarReq // Variable request Answers chan VarAns // Variable response // Scope wide Outer *BondgoCheck // The previous scope Clean *BondgoCheck // The scope that need to be clean by its next brother aka when the scope ends Vars map[string]VarCell // The map of variable in the current scope Returns []VarCell // Returns for functions call CurrentLoop string CurrentSwitch string CurrentDevice string CurrentRoutine int // Aka current processor }
func (*BondgoCheck) Create_Bondmachine ¶
func (bg *BondgoCheck) Create_Bondmachine(rsize int, filter string) (*bondmachine.Bondmachine, *bondmachine.Residual, error)
func (*BondgoCheck) Create_Connecting_Processor ¶
func (bg *BondgoCheck) Create_Connecting_Processor(rsize int, procid int) (*procbuilder.Machine, bool)
func (*BondgoCheck) Create_Etherbond_Cluster ¶
func (bg *BondgoCheck) Create_Etherbond_Cluster(rsize int, extc *etherbond.Cluster) (*etherbond.Cluster, []uint32, []*bondmachine.Bondmachine, []*bondmachine.IOmap, []*bondmachine.Residual, error)
func (*BondgoCheck) Create_Udpbond_Cluster ¶
func (bg *BondgoCheck) Create_Udpbond_Cluster(rsize int, extc *udpbond.Cluster) (*udpbond.Cluster, []uint32, []*bondmachine.Bondmachine, []*bondmachine.IOmap, []*bondmachine.Residual, error)
type BondgoConfig ¶
type BondgoConfig struct { Debug bool Verbose bool Mpm bool MaxRegs int Rsize uint8 Basic_type string Basic_chantype string Cascading_io bool }
func (*BondgoConfig) In_debug ¶
func (db *BondgoConfig) In_debug() bool
type BondgoFunctions ¶
type BondgoFunctions struct { *BondgoConfig *BondgoMessages Functions map[string]FunctCell }
func (*BondgoFunctions) Init_Functions ¶
func (fn *BondgoFunctions) Init_Functions(cfg *BondgoConfig, ms *BondgoMessages)
func (*BondgoFunctions) String ¶
func (fn *BondgoFunctions) String() string
type BondgoMessages ¶
type BondgoMessages struct { Config *BondgoConfig Error_status bool // The compiler general status Message_list []string // The list of compiler messages }
func (*BondgoMessages) Dump_log ¶
func (b *BondgoMessages) Dump_log() string
func (*BondgoMessages) Init_Messages ¶
func (b *BondgoMessages) Init_Messages(cfg *BondgoConfig)
func (*BondgoMessages) Is_faulty ¶
func (b *BondgoMessages) Is_faulty() bool
func (*BondgoMessages) Log ¶
func (b *BondgoMessages) Log(line string)
func (*BondgoMessages) Set_faulty ¶
func (b *BondgoMessages) Set_faulty(line string)
func (*BondgoMessages) Warning ¶
func (b *BondgoMessages) Warning(line string)
type BondgoRequirements ¶
type BondgoRequirements struct { Config *BondgoConfig // Global compiler config Procr map[int]*ProcRequirements IOr map[int]*IORequirements Chanr map[int]*ChanRequirements Shrdr map[int]*SharedMemRequirements }
func (*BondgoRequirements) Abstract_assembler ¶
func (bg *BondgoRequirements) Abstract_assembler(rsize int, asmcode []string, used chan UsageNotify) error
func (*BondgoRequirements) Dump_Requirements ¶
func (reqmnt *BondgoRequirements) Dump_Requirements() string
func (*BondgoRequirements) Init_Requirements ¶
func (reqmnt *BondgoRequirements) Init_Requirements(cfg *BondgoConfig)
func (*BondgoRequirements) Usage_Monitor ¶
func (reqmnt *BondgoRequirements) Usage_Monitor(useditem chan UsageNotify, usagedone chan bool)
type BondgoResults ¶
type BondgoResults struct { Config *BondgoConfig Proc *procbuilder.Arch Bmach *bondmachine.Bondmachine Program map[int]*BondgoRoutine // The generated assembly }
func (*BondgoResults) CountLines ¶
func (rs *BondgoResults) CountLines(proc_id int) int
func (*BondgoResults) GetProgram ¶
func (rs *BondgoResults) GetProgram(proc_id int) []string
func (*BondgoResults) Init_Results ¶
func (rs *BondgoResults) Init_Results(cfg *BondgoConfig)
func (*BondgoResults) Replacer ¶
func (rs *BondgoResults) Replacer(proc_id int, from string, to string)
func (*BondgoResults) Shift_program_location ¶
func (rs *BondgoResults) Shift_program_location(proc_id int, n int)
func (*BondgoResults) WriteLine ¶
func (rs *BondgoResults) WriteLine(proc_id int, line string)
func (*BondgoResults) Write_assembly ¶
func (rs *BondgoResults) Write_assembly(proc_id int) string
type BondgoRoutine ¶
type BondgoRoutine struct {
Lines []string
}
func (*BondgoRoutine) Append ¶
func (p *BondgoRoutine) Append(line string)
func (*BondgoRoutine) Checker ¶
func (p *BondgoRoutine) Checker(ck string) bool
func (*BondgoRoutine) Remove_program_location ¶
func (p *BondgoRoutine) Remove_program_location()
func (*BondgoRoutine) Replacer ¶
func (p *BondgoRoutine) Replacer(from string, to string)
func (*BondgoRoutine) Shift_program_location ¶
func (p *BondgoRoutine) Shift_program_location(n int)
type BondgoRuninfo ¶
type BondgoRuninfo struct { Config *BondgoConfig // Global compiler config Used_cells map[int]VarCells IO []IOInfo Channels []ChanInfo }
func (*BondgoRuninfo) Init_Runinfo ¶
func (ri *BondgoRuninfo) Init_Runinfo(cfg *BondgoConfig)
func (*BondgoRuninfo) Var_assigner ¶
func (ri *BondgoRuninfo) Var_assigner(req chan VarReq, resp chan VarAns, useditem chan UsageNotify, assignerdone chan bool)
This goroutine assign or frees used memory within a processor
type ChanRequirements ¶
type ChanRequirements struct {
Connected []int
}
Maybe a rewrite in term of SO (with interfaces) is need.
func (*ChanRequirements) Dump_Requirements ¶
func (reqmnt *ChanRequirements) Dump_Requirements() string
type IORequirements ¶
func (*IORequirements) Dump_Requirements ¶
func (reqmnt *IORequirements) Dump_Requirements() string
type ProcRequirements ¶
type ProcRequirements struct { Opcodes []string Registersize int Inputs int Outputs int Romsize int Ramsize int Device string }
func (*ProcRequirements) Dump_Requirements ¶
func (reqmnt *ProcRequirements) Dump_Requirements() string
type SharedMemRequirements ¶
type SharedMemRequirements struct { }
type UsageNotify ¶
type VarCell ¶
type VarCell struct { Vtype *VarType // The variable type Procobjtype uint8 // 0 Register, 1 RAM, 2 output (notin vars) etc. Id int // Local (within the processor) reference to the object among objects of the same type Start_id int // Local (within the processor) reference to the object among objects of the same type (start data) End_id int // Local (within the processor) reference to the object among objects of the same type (end data) Global_id int // Global reference to the object among objects of the same type Start_globalid int // Global reference to the object among objects of the same type (start data) End_globalid int // Global reference to the object among objects of the same type (end data) }
The type to hold variables in processor objects (mem or registers or whatever) and in bondmachine objects
Click to show internal directories.
Click to hide internal directories.