Hi
I’m watching “UVMF, one bite at a time” course. I want to use one of the example YAML files included in the UVMF download package to automatically generate the corresponding UVM code. I need some guidance. I don’t know what to do with the YAML file. I installed Python but I still don’t know what to do with the ‘yaml2uvmf.py’ file: how to execute it and how to pass to it the example YAML file to be converted to UVM code. I would be grateful if I can get some instruction here, or a hint to a document which explains the procedure step by step.
Thanks
In reply to Farhad:
you want something like this :
python $UVMF_HOME/scripts/yaml2uvmf.py mem_if_cfg.yaml pkt_if_cfg.yaml predictor_components.yaml block_a_env_cfg.yaml block_a_bench_cfg.yaml -d ./unvmf_template_output
you pass all of the YAML files for your agents, environment and bench to the generator
-d speifies the output directory
If you look in the following folder:
$UVMF_HOME/docs/generator_tutorials/alu/yaml_config_files there is a .bat script showeing the command to run
The PDF in the alu folder walks you through a complete tutorial
hope that helps
Graeme
In reply to graeme_jessiman:
Thank you, Graeme
I don’t know what I’m doing wrong, but when I do as you said above, I get the following error:
AttributeError: module ‘jinja2’ has no attribute ‘version’
Maybe I’m missing some other software or necessary step?
Thanks again for taking the time and answering my question.
Farhad
In reply to Farhad:
Hi Frahd
what version of Python are you using ?
There is a README file in the $UVMF_HOME/templates/python folder which says the following:
If using Python 2, everything should work out-of-the-box as all required packages are
shipped with the installation:
- yaml
- jinja2
- markupsafe
- voluptuous
If using Python 3, the user is responsible for installing some of these packages:
- yaml
- jinja2
- markupsafe
NOTE: It appears that these packages come as part of Anaconda Python3 so no further
installations should be required.
In reply to graeme_jessiman:
Thank you very much, Graeme. I installed Anaconda Python3, which solved my problem.