{"action":"created","issue":{"url":"https://api.github.com/repos/olofk/fusesoc/issues/203","repository_url":"https://api.github.com/repos/olofk/fusesoc","labels_url":"https://api.github.com/repos/olofk/fusesoc/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/olofk/fusesoc/issues/203/comments","events_url":"https://api.github.com/repos/olofk/fusesoc/issues/203/events","html_url":"https://github.com/olofk/fusesoc/issues/203","id":310060239,"number":203,"title":"Question: How scripts work in fusesoc?","user":{"login":"ThomasHornschuh","id":20595222,"avatar_url":"https://avatars2.githubusercontent.com/u/20595222?v=4","gravatar_id":"","url":"https://api.github.com/users/ThomasHornschuh","html_url":"https://github.com/ThomasHornschuh","followers_url":"https://api.github.com/users/ThomasHornschuh/followers","following_url":"https://api.github.com/users/ThomasHornschuh/following{/other_user}","gists_url":"https://api.github.com/users/ThomasHornschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasHornschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasHornschuh/subscriptions","organizations_url":"https://api.github.com/users/ThomasHornschuh/orgs","repos_url":"https://api.github.com/users/ThomasHornschuh/repos","events_url":"https://api.github.com/users/ThomasHornschuh/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasHornschuh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-03-30T12:59:07Z","updated_at":"2018-05-14T18:40:52Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi,\r\nI tried to add tcl a tcl script to a core to be build with Vivado. Specifically I have a build script for a Vivado IP  integrator block design (created with the write_bd macro) which I want to add to my build.\r\n\r\nThe idea behind is, that the toplevel of my design is build with IP integrator (basically this is the safest and easiest way to combine custom RTL with Xilinx IP like DDR3 RAM interface).\r\n\r\nSo my core file looks like this:\r\n\r\n````\r\nCAPI=1\r\n[main]\r\nname = ::bonfire-arty:0\r\ndepend = ::bonfire-axi:0 ::bonfire-axi4l2wb:0 ::zpuino-uart:0\r\nbackend = vivado\r\n\r\n\r\n[fileset rtl]\r\nfiles = bonfire_axi_sysio.vhd wb_io.vhd\r\n    ../lib/bonfire-soc/spi/wb_spi_interface.vhd\r\n    ../lib/bonfire-soc/spi/spimaster.vhd\r\n    BootMem.vhd\r\n    wishbone_subsystem.vhd\r\nfile_type=vhdlSource\r\n\r\n[fileset xdc]\r\nfiles = Arty.xdc\r\nfile_type=xdc\r\nscope=synth\r\n\r\n[fileset scripts]\r\nfile_type=tclSource\r\nfiles = ../scripts/fusesoc_build_1.tcl  ../scripts/bd_bonfire_arty_1704.tcl  ../scripts/fusesoc_build_2.tcl\r\n\r\n\r\n[simulator]\r\ntoplevel = bonfire_axi_top\r\n\r\n[ghdl]\r\nanalyze_options = --ieee=synopsys\r\nrun_options = --ieee=synopsys\r\n\r\n[vivado]\r\npart=xc7a35ticsg324-1L\r\n````\r\n\r\nWhen running a fusesoc build the Vivado tcl will source the scripts before adding any files from fileset rtl. But I need it the other way around, I want my scripts be added between project setup and implementation run. \r\n\r\nI tried to add a [script] section, but I doen't change anything. But this section is also not really documented what it exactly means. Currently I can work around, with running build with the --setup option, move the scripts to the right place in the build tcl and then run it. \r\n\r\nFrom the three scripts in the example above the first one should be run before adding rtl (it sets things like the board type and custom IP repo directories, the second and third should run after rtl (the last script creates the toplevel hd wrapper for the block design and set it as top module.\r\n\r\nI'm not sure if my ideas are in scope of FuseSoC, so consider this issue really as question.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/olofk/fusesoc/issues/comments/388920464","html_url":"https://github.com/olofk/fusesoc/issues/203#issuecomment-388920464","issue_url":"https://api.github.com/repos/olofk/fusesoc/issues/203","id":388920464,"user":{"login":"lvoudour","id":23616322,"avatar_url":"https://avatars3.githubusercontent.com/u/23616322?v=4","gravatar_id":"","url":"https://api.github.com/users/lvoudour","html_url":"https://github.com/lvoudour","followers_url":"https://api.github.com/users/lvoudour/followers","following_url":"https://api.github.com/users/lvoudour/following{/other_user}","gists_url":"https://api.github.com/users/lvoudour/gists{/gist_id}","starred_url":"https://api.github.com/users/lvoudour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvoudour/subscriptions","organizations_url":"https://api.github.com/users/lvoudour/orgs","repos_url":"https://api.github.com/users/lvoudour/repos","events_url":"https://api.github.com/users/lvoudour/events{/privacy}","received_events_url":"https://api.github.com/users/lvoudour/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T18:40:52Z","updated_at":"2018-05-14T18:40:52Z","author_association":"NONE","body":"Yes that did the trick, cheers"}}
{"actor":{"display_login":"lvoudour"}}