target:
read IP-XACT attribute value and set it to UVM conf file automatically.
environment requirements
lP-XACT file download from UVM ref flow
flow plan
- using lxml to parse the IP-XACT file(.xml)
- using xpath to find all values in this .xml
ref lxml + python + IPXACT - using cog to gen UVM code
--[[[cog
-- import cog
-- import IParser
-- ...
-- pp = None
-- def load():
-- global pp
-- pp = IParser()
-- pp.open('spi_rgm.spirit')
--
-- def genRegfield():
-- global pp
-- reg_text = pp.findAll('/spirit:component/spirit:vendor', dtype='text')
-- prefix = "uvm_reg_field::type_id::create(\"%s\")" %(req_test)
-- cog.outl(prefix)
-- ....
--]]]
--[[[end]]]
results:
>>>
uvm_reg_field::type_id::create("5")..

沒有留言:
張貼留言