-
Notifications
You must be signed in to change notification settings - Fork 162
Closed
Labels
Description
The following code:
module FileOrder where
import Clash.Explicit.Prelude
topEntity ::
Clock System ->
Reset System ->
Signal System Int ->
Signal System Int ->
Signal System Int ->
Signal System Int
topEntity clk rst = assert clk rst "FileOrder"
{-# NOINLINE topEntity #-}
has the following manifest (VHDL):
[...]
"files": [
{
"name": "topEntity.sdc",
"sha256": "13d4c1aafcc09a84d81d3b60d513cb901384a10e27e5a5a16572a600f15895f3"
},
{
"name": "FileOrder_topEntity_types.vhdl",
"sha256": "d02c6454a42e980254dbe81ffbdbaa1199419a1f9e1dcfca374692415139d3f1"
},
{
"name": "topEntity.vhdl",
"sha256": "e90c47000d5d18b95d9d11d375eb94693b67c49cf16a7fa493d541ff31d5bea7"
},
{
"name": "topEntity_slv2string_2F58399B7F4E729C.vhdl",
"sha256": "a94cf66fcd9f744ef94d77d5c4619960cbbacf140f8254b12cc2ee7e31bcf7b2"
}
],
The file list is supposed to be sorted:
, fileNames :: [(FilePath, ByteString)]
-- ^ Names and hashes of all the generated files for the @TopEntity@. Hashes
-- are SHA256.
--
-- This list is reverse topologically sorted. I.e., a component might depend
-- on any component listed before it, but not after it.
and we really want that as well. However, topEntity.vhdl
depends on topEntity_slv2string_....vhdl
which is listed after it.
I tried to fix this in https://github.com/clash-lang/clash-compiler/tree/topo-sort but it didn't work and I currently don't have the time to investigate. If you're working on this, feel free to (force) push to that branch and make it your own.