Skip to content

Commit bcbbf4a

Browse files
Initial cosmo hp implementation
1 parent bf79db7 commit bcbbf4a

File tree

12 files changed

+12172
-439
lines changed

12 files changed

+12172
-439
lines changed

hdl/ip/vhd/i2c/io_expanders/PCA9506ish/pca9506_pkg.vhd

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ package pca9506_pkg is
2323
);
2424

2525
type pca9506_pin_t is array (0 to 4) of std_logic_vector(7 downto 0);
26+
type multiple_pca9506_pin_t is array (natural range <>) of pca9506_pin_t;
2627

2728
function get_irq_pend(
2829
cur_reg: io_type;

hdl/ip/vhd/i2c/muxes/PCA9545ish/pca9545ish_function.vhd

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ end entity;
5050
architecture rtl of pca9545ish_function is
5151
function is_valid(
5252
data : std_logic_vector(7 downto 0);
53-
allowed_to_enable : std_logic) return boolean is
53+
enable_allowed : std_logic) return boolean is
5454
begin
5555
-- allow only writes of 0 even when we're not allowed to enable
56-
if allowed_to_enable = '0' and data /= 0 then
56+
if enable_allowed = '0' and data /= 0 then
5757
return false;
5858
end if;
5959
-- only allow clear and one-hot bits 0-2

hdl/ip/vhd/spi/axi_controller/spi_axi_pkg.vhd

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ package body spi_axi_pkg is
7070
when spi_opcode_bit_clr =>
7171
return rdata and (not wdata);
7272
when others =>
73+
assert false report "invalid opcode for bit operation";
7374
return rdata;
7475
end case;
7576

hdl/projects/cosmo_hp/BUCK

+18
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
load("//tools:hdl.bzl", "vhdl_unit")
22
load("//tools:yosys.bzl", "ice40_bitstream")
33

4+
5+
vhdl_unit(
6+
name = "hp_subsystem_top",
7+
srcs = glob(["hp_subsystem/*.vhd"]),
8+
deps = [
9+
"//hdl/ip/vhd/i2c/io_expanders/PCA9506ish:pca9506_top",
10+
],
11+
standard = "2008",
12+
)
13+
414
vhdl_unit(
515
name = "cosmo_hp_top",
616
srcs = glob(["*.vhd"]),
17+
deps = [
18+
":hp_subsystem_top",
19+
"//hdl/ip/vhd/synchronizers:async_reset_bridge",
20+
# "//hdl/ip/vhd/i2c/io_expanders/PCA9506ish:pca9506_top",
21+
"//hdl/ip/vhd/i2c/muxes/PCA9545ish:pca9545ish_top",
22+
"//hdl/ip/vhd/i2c/target:i2c_phy_consolidator",
23+
"//hdl/ip/vhd/spi/axi_controller:spi_axi_controller",
24+
],
725
standard = "2008",
826
)
927

0 commit comments

Comments
 (0)