Commit dcd3e484 authored by Rémi's avatar Rémi
Browse files

Add lsb_in/msb_in

parent 38de7108
name = "AdderGraphs"
uuid = "818587fb-0c22-4279-a2b9-8b16b5360b71"
version = "0.2.11"
version = "0.2.12"
......@@ -87,6 +87,10 @@ export set_errors_computed!
export are_full_adders_computed
export set_full_adders_computed!
export get_origin
export get_lsb_in
export get_msb_in
export set_lsb_in!
export set_msb_in!
export get_total_nb_full_adders
export get_addernode_by_value
export read_addergraph
......
......@@ -72,6 +72,22 @@ function get_origin(addergraph::AdderGraph)
return addergraph.origin
end
function get_lsb_in(addergraph::AdderGraph)
return get_adder_lsb(get_origin(addergraph))
end
function get_msb_in(addergraph::AdderGraph)
return get_adder_msb(get_origin(addergraph))
end
function set_lsb_in!(addergraph::AdderGraph, lsb::Int)
set_adder_lsb!(get_origin(addergraph), lsb)
return addergraph
end
function set_msb_in!(addergraph::AdderGraph, msb::Int)
set_adder_msb!(get_origin(addergraph), msb)
return addergraph
end
function get_total_nb_full_adders(addergraph::AdderGraph)
return sum(get_nb_full_adders(addernode) for addernode in get_nodes(addergraph))
end
......
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