Skip to content

Commit

Permalink
Add countdown to BUCK, remove VHDL2019 from strobe
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-Hartwig committed Dec 10, 2024
1 parent ea7421e commit 428ebd1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 28 deletions.
65 changes: 40 additions & 25 deletions hdl/ip/vhd/common/BUCK
Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
load("//tools:hdl.bzl", "vhdl_unit")

# Utilities

vhdl_unit(
name = "calc_pkg",
srcs = ["utils/calc_pkg.vhd",],
visibility = ['PUBLIC'],
)
# Countdown

vhdl_unit(
name = "time_pkg",
srcs = ["utils/time_pkg.vhd",],
visibility = ['PUBLIC'],
)

vhdl_unit(
name = "transforms_pkg",
srcs = ["utils/transforms_pkg.vhd",],
name = "countdown",
srcs = glob(["countdown/countdown.vhd"]),
deps = [],
visibility = ['PUBLIC'],
)

vhdl_unit(
name = "utilities_tb",
name = "countdown_tb",
is_tb = True,
srcs = glob(["utils/sims/*.vhd"]),
deps = [
":transforms_pkg",
":time_pkg",
":calc_pkg",
],
srcs = glob(["countdown/sims/*.vhd"]),
deps = [":countdown"],
visibility = ['PUBLIC'],
)

# Interfaces
# Interfaces - Note these packages require VHDL-2019 support

vhdl_unit(
name = "streaming_if_pkg",
Expand All @@ -48,7 +33,6 @@ vhdl_unit(
name = "strobe",
srcs = glob(["strobe/strobe.vhd"]),
deps = [],
standard = "2019",
visibility = ['PUBLIC'],
)

Expand All @@ -57,6 +41,37 @@ vhdl_unit(
is_tb = True,
srcs = glob(["strobe/sims/*.vhd"]),
deps = [":strobe"],
standard = "2019",
visibility = ['PUBLIC'],
)

# Utilities

vhdl_unit(
name = "calc_pkg",
srcs = ["utils/calc_pkg.vhd",],
visibility = ['PUBLIC'],
)

vhdl_unit(
name = "time_pkg",
srcs = ["utils/time_pkg.vhd",],
visibility = ['PUBLIC'],
)

vhdl_unit(
name = "transforms_pkg",
srcs = ["utils/transforms_pkg.vhd",],
visibility = ['PUBLIC'],
)

vhdl_unit(
name = "utilities_tb",
is_tb = True,
srcs = glob(["utils/sims/*.vhd"]),
deps = [
":transforms_pkg",
":time_pkg",
":calc_pkg",
],
visibility = ['PUBLIC'],
)
1 change: 0 additions & 1 deletion hdl/ip/vhd/common/strobe/sims/strobe_tb.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ library vunit_lib;
context vunit_lib.vunit_context;
context vunit_lib.vc_context;


entity strobe_tb is
generic (
runner_cfg : string
Expand Down
2 changes: 1 addition & 1 deletion hdl/ip/vhd/common/strobe/sims/strobe_th.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ library vunit_lib;

entity strobe_th is
generic (
TICKS : natural
TICKS : positive
);
end entity;

Expand Down
2 changes: 1 addition & 1 deletion hdl/ip/vhd/common/strobe/strobe.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ entity strobe is
clk : in std_logic;
reset : in std_logic;

strobe : out std_logic;
strobe : out std_logic
);
end entity strobe;

Expand Down

0 comments on commit 428ebd1

Please sign in to comment.