Skip to content

Issues trying to create YAML device file from example #117

@clavin-xlnx

Description

@clavin-xlnx

I am attempting to generate a YAML-equivalent version of an Interchange device file. I am following the example shown on the main README.md :

Annotated the xc7a35tcpg236-1 database with constraints:

python3 -mfpga_interchange.patch \
    --schema_dir $RAPIDWRIGHT_PATH/interchange \
    --schema device \
    --patch_path constraints \
    --patch_format yaml \
    xc7a35tcpg236-1.device \
    test_data/series7_constraints.yaml \
    xc7a35tcpg236-1_constraints.device

I recognize that --schema_dir $RAPIDWRIGHT_PATH/interchange is obsolete and used a separate clone of the fpga-internchange-schema repo. I ran into two problems:

  1. After building the python-fpga-interchange module and attempting to run the command above, I get this error message:
Traceback (most recent call last):
  File "/group/zircon2/clavin/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/group/zircon2/clavin/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/clavin/tools/python-fpga-interchange/fpga_interchange/patch.py", line 72, in <module>
    main()
  File "/home/clavin/tools/python-fpga-interchange/fpga_interchange/patch.py", line 57, in main
    args.root_schema_path)
  File "/home/clavin/tools/python-fpga-interchange/fpga_interchange/convert.py", line 158, in get_schema
    schemas = Interchange(schema_dir)
  File "/home/clavin/tools/python-fpga-interchange/fpga_interchange/interchange_capnp.py", line 857, in __init__
    imports=search_path)
  File "capnp/lib/capnp.pyx", line 4342, in capnp.lib.capnp.load
  File "capnp/lib/capnp.pyx", line 3572, in capnp.lib.capnp.SchemaParser.load
capnp.lib.capnp.KjException: clavin/workspace/RapidWright/interchange/fpga-interchange-schema/interchange/References.capnp:15: failed: Import failed: /capnp/java.capnp

It seems the directions do not specify how I should communicate the java.capnp file to the tool. I commented out all references to use of the file as they are not needed here, so I moved on.

  1. After commenting out the java.capnp references, the tool completes without any output. It does create the expected output file, but the file is binary, I was expecting it to output a YAML equivalent.

I setup python-fpga-interchange with the following (I am using Python 3.7.3 from an Anaconda release):

git clone https://github.com/SymbiFlow/python-fpga-interchange.git
cd python-fpga-interchange/
python3 -mvenv env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions