Commit eab2bd03 authored by Rémi's avatar Rémi
Browse files
parent e0fd6dbe
name = "AdderGraphs"
uuid = "818587fb-0c22-4279-a2b9-8b16b5360b71"
version = "0.2.0"
version = "0.2.1"
module AdderGraphs
abstract type AbstractInputEdge end
# OriginAdder: AdderNode(1, Vector{InputEdge}(), 0, 0, -1.0, 0)
mutable struct AdderNode
value::Int
inputs::Vector{InputEdge}
inputs::Vector{AbstractInputEdge}
msb_out::Int
lsb_out::Int
error_out::Float64
nb_full_adders::Int
end
mutable struct InputEdge <: AbstractInputEdge
input_adder::AdderNode
shift::Int
is_negative::Bool
end
function origin_addernode()
return AdderNode(1, Vector{InputEdge}(), 0, 0, -1.0, 0)
end
......@@ -19,13 +27,6 @@ function AdderNode(value::Int, inputs::Vector{InputEdge})
end
mutable struct InputEdge
input_adder::AdderNode
shift::Int
is_negative::Bool
end
mutable struct AdderGraph
origin::AdderNode
constants::Vector{AdderNode}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment