Line 217... |
Line 217... |
|
|
#r_def = []
|
#r_def = []
|
r_name = []
|
r_name = []
|
r_dir = []
|
r_dir = []
|
|
|
|
p c.interfaces
|
c.ports( "i1" ) do |arg_name,arg_dir, arg_default, arg_is_last|
|
c.ports( "i1" ) do |arg_name,arg_dir, arg_default, arg_is_last|
|
#r_def << arg_def
|
#r_def << arg_def
|
r_name << arg_name
|
r_name << arg_name
|
r_dir << arg_dir
|
r_dir << arg_dir
|
end
|
end
|
Line 235... |
Line 236... |
|
|
describe SOCMaker::Component, "consistency_check" do
|
describe SOCMaker::Component, "consistency_check" do
|
|
|
|
|
it "should throw an error if an incomplete interface is used" do
|
it "should throw an error if an incomplete interface is used" do
|
file = { "file.vhd".to_sym => SOCMaker::HDLFile.new( "./file.vhd" ) }
|
|
|
|
# three (auto) mandatory ports
|
# three (auto) mandatory ports
|
ifc_s1 = SOCMaker::IfcSpc.new( "i1", "v1", 'ports' => { p1: { dir: 1}, p2: {dir: 1}, p3: {dir:0} } )
|
ifc_s1 = SOCMaker::IfcSpc.new( "i1", "v1", 'ports' => { p1: { dir: 1}, p2: {dir: 1}, p3: {dir:0} } )
|
|
SOCMaker::lib.add_ifc( ifc_s1 )
|
|
|
# interface implementaiton with only two of the three ports
|
# interface implementaiton with only two of the three ports
|
p1 = SOCMaker::IfcPort.new( "p1", 1 )
|
p1 = SOCMaker::IfcPort.new( "p1", 1 )
|
p2 = SOCMaker::IfcPort.new( "p2", 2 )
|
p2 = SOCMaker::IfcPort.new( "p2", 2 )
|
ifc_d1 = SOCMaker::IfcDef.new( "i1", "v1", 0, { m_p1: p1, m_p2: p2 } )
|
ifc_d1 = SOCMaker::IfcDef.new( "i1", "v1", 0, { m_p1: p1, m_p2: p2 } )
|