Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare first release candidate #5

Open
wants to merge 51 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0dfcb89
Added common interfaces for differential signals, high-speed lanes an…
Paebbels Jul 4, 2020
db96c57
Added I²C interface descriptions.
Paebbels Jul 4, 2020
a7663b1
Added JTAG interface.
Paebbels Jul 4, 2020
35489e8
Added SPI interface.
Paebbels Jul 4, 2020
4a17103
Fixed package name and signal name mappings.
Paebbels Jul 4, 2020
419863f
Added license text.
Paebbels Jul 4, 2020
9fb05fc
Added license text.
Paebbels Jul 4, 2020
582593b
Added license text.
Paebbels Jul 4, 2020
c7f12f6
Added DS for differential signaling to T_Lane. Added license text.
Paebbels Jul 4, 2020
0767550
Merged common interfaces
Paebbels Jul 4, 2020
83b6619
Merged i2c
Paebbels Jul 4, 2020
ed29bbb
Merged jtag
Paebbels Jul 4, 2020
c5e528a
Merged SPI
Paebbels Jul 4, 2020
699a2d0
Added Command-Status-Error interface.
Paebbels Jul 4, 2020
ca12d94
Added initial documentation.
Paebbels Jul 4, 2020
2083138
Fixed yml formatting for RTD. Extended conf.py. Added license file. A…
Paebbels Jul 4, 2020
e47ce6a
Disabled recursive loading of main requirements file.
Paebbels Jul 4, 2020
66d6dd2
This solves #10.
Paebbels Jul 4, 2020
b6d4734
Fixed typo.
Paebbels Jul 4, 2020
23908ed
Added common types for AXI4.
Paebbels Jul 5, 2020
ed32569
Added unconstraint interface description for AXI4-Lite.
Paebbels Jul 5, 2020
7c4a6f5
Added generic package, so commonly used presized AXI interface can be…
Paebbels Jul 5, 2020
2c9e68c
Added commonly used presized AXI4-Lite interfaces.
Paebbels Jul 5, 2020
315bda5
Added views.
Paebbels Jul 5, 2020
5bc9ae1
Merged CSE
Paebbels Jul 5, 2020
afb8728
Added UART interface and views.
Paebbels Jul 5, 2020
6f85961
Merged UART
Paebbels Jul 5, 2020
706880c
Added VGA interface.
Paebbels Jul 5, 2020
121e68d
Added I²S interface.
Paebbels Jul 5, 2020
dec4136
Merged I2S
Paebbels Jul 5, 2020
e8fb5bc
Merge pull request #12 from VHDL/naming
Paebbels Jul 5, 2020
db4944c
Merge pull request #11 from VHDL/documentation
Paebbels Jul 5, 2020
0aa8cd0
Added draft for Ethernet related interfaces (RMII, MII, RGMII, GMII, …
Paebbels Jul 5, 2020
f9146df
Added MIPI D-PHY interface.
Paebbels Jul 5, 2020
b7f6c4c
Fixed data in MIPI D-PHY to use an 'array mode view indication'.
Paebbels Jul 5, 2020
6413ed5
Added physical interfaces for cages like SFP and QSFP.
Paebbels Jul 5, 2020
1f7d22d
Merged Cages
Paebbels Jul 5, 2020
f8abd03
Updated after style reviews.
Paebbels Jul 6, 2020
4bf6fb5
Added predefined constants for AXI4.
Paebbels Jul 6, 2020
c3d53ca
Added missing Cache field in AXI4-Lite.
Paebbels Jul 6, 2020
24b8cb5
Added implementation for AXI4-Stream.
Paebbels Jul 6, 2020
995b4b3
Added AXI4 definitions (incomplete).
Paebbels Jul 6, 2020
f85b760
Added MIPI C-PHY interface.
Paebbels Jul 6, 2020
cd82571
Renamed Sender to Transmitter in UART protocol.
Paebbels May 18, 2023
a9c279c
Specified generic types in CSE package as enumeration types.
Paebbels May 18, 2023
9cab69e
Merge branch 'AXI' into dev
Paebbels May 18, 2023
a92ecae
Merge branch 'Ethernet' into dev
Paebbels May 18, 2023
9211893
Added MIPI M-PHY interface.
Paebbels Jul 6, 2020
9c3d619
Merge branch 'MIPI' into dev
Paebbels May 18, 2023
0c6ba95
Merge branch 'VGA' into dev
Paebbels May 18, 2023
24223c3
Updated file headers.
Paebbels May 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
root = true

[*]
charset = utf-8
# end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
tab_width = 2


[*.py]
indent_style = tab
indent_size = 2

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.{json,ini}]
indent_style = tab
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.rst]
indent_style = space
indent_size = 3
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
/temp
# Python cache and object files
__pycache__/
*.py[cod]

# Sphinx documentation
/doc/_build

# PyCharm project
/.idea/workspace.xml

# Temperary generated outputs from scripts
/temp
21 changes: 21 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

submodules:
include: []

build:
image: latest

python:
version: 3.8
install:
- requirements: doc/requirements.txt

sphinx:
builder: html
configuration: doc/conf.py

formats:
- pdf
# - htmlzip
# - epub
105 changes: 105 additions & 0 deletions IO/Cages.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
-- vim: tabstop=2:shiftwidth=2:noexpandtab
-- kate: tab-width 2; replace-tabs off; indent-width 2;
-- =============================================================================
-- Authors: Patrick Lehmann
--
-- Package: VHDL-2019 interface descriptions for cages
--
-- Description:
-- -------------------------------------
-- This package
--
-- License:
-- =============================================================================
-- Copyright 2016-2020 Open Source VHDL Group
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- =============================================================================

library IEEE;
use IEEE.std_logic_1164.all;

use work.Common.all;
use work.I2C.all;


-- Signal name mappings
--
--
package Cages is
-- SFP/SFP+
type SFP_Interface is record
ModuleAbsent : std_logic;

I2C : I2C_PCB_Interface;

TX_Disable : std_logic;
TX_Fault : std_logic;
RX_LossOfSignal : std_logic;

TX : Differatial_Interface;
RX : Differatial_Interface;
end record;

view SFP_ICView of SFP_Interface is
ModuleAbsent : in;

I2C : view I2C_PCB_View;

TX_Disable : out;
TX_Fault : in;
RX_LossOfSignal : in;

TX : view Differatial_OutView;
RX : view Differatial_InView;
end view;
alias SFP_CageView is SFP_ICView'converse;

type SFP_Interface_Vector is
array(natural range <>)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I think we should use integer ranges. I find the natural ranges of some of the standard vector types limiting at times. Can't come up with a good example for negative indices here but I don't think we should add such a restriction unless we have very good reasons for that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As natural is a subtype of integer, the range could be extended later if a usecase requires it. Such a change is backward compatible.

of SFP_Interface;


-- QSFP/QSFP+/QSFP28/QSFP28+
type QSFP_Interface is record
ModuleSelect_n : std_logic;
ModulePresent_n : std_logic;
LowPowerMode : std_logic;

Reset_n : std_logic;
I2C : I2C_PCB_Interface;
Interrupt_n : std_logic;

TX : Differatial_Interface_Vector(3 downto 0);
RX : Differatial_Interface_Vector(3 downto 0);
end record;

view QSFP_ICView of QSFP_Interface is
ModuleSelect_n : out;
ModulePresent_n : in;
LowPowerMode : out;

Reset_n : out;
I2C : view I2C_PCB_View;
Interrupt_n : in;

TX : view ( Differatial_OutView );
RX : view ( Differatial_InView );
end view;
alias QSFP_CageView is QSFP_ICView'converse;

type QSFP_Interface_Vector is
array(natural range <>)
of QSFP_Interface;
end package;
93 changes: 93 additions & 0 deletions IO/Common.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
-- vim: tabstop=2:shiftwidth=2:noexpandtab
-- kate: tab-width 2; replace-tabs off; indent-width 2;
-- =============================================================================
-- Authors: Patrick Lehmann
--
-- Package: VHDL-2019 common interface descriptions
--
-- Description:
-- -------------------------------------
-- This package
--
-- License:
-- =============================================================================
-- Copyright 2016-2020 Open Source VHDL Group
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- =============================================================================

library IEEE;
use IEEE.std_logic_1164.all;

package Common is
-- Differential signaling (DS or LVDS)
type Differatial_Interface is record
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type Differatial_Interface is record
type Differential_Interface is record

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I'll search where I used that type elsewhere.

P : std_logic;
N : std_logic;
end record;

alias LVDS_Interface is Differatial_Interface;

view Differatial_OutView of Differatial_Interface is
P : out;
N : out;
end view;
alias Differatial_InView is Differatial_OutView'converse;

alias LVDS_OutView is Differatial_OutView;
alias LVDS_InView is Differatial_InView;

type Differatial_Interface_Vector is
array(natural range <>)
of Differatial_Interface;

alias LVDS_Interface_Vector is Differatial_Interface;


-- Transceiver lanes with differential signaling
type DifferentialLane_Interface is record
TX : Differatial_Interface;
RX : Differatial_Interface;
end record;

view DifferentialLane_TransmitterView of DifferentialLane_Interface is
TX : view Differatial_OutView;
RX : view Differatial_InView;
end view;

type DifferentialLane_Interface_Vector is
array(natural range <>)
of DifferentialLane_Interface;

alias LVDSLane_Interface_Vector is DifferentialLane_Interface_Vector;


-- Tristate (3-state) interface
type Tristate_Interface is record
I : std_logic; -- Input

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a need to comment the meaning of an identifier the identifier should probably be renamed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question for the whole repository should be if we:

  • follow original naming of standards, because many developers might be used to such naming.
  • minimally cleaning up names to unify naming across interfaces and packages in that repository
  • fully cleaning up all names

O : std_logic; -- Output
T : std_logic; -- Tristate / OutputEnable_n
end record;

view Tristate_OutView of Tristate_Interface is
I : in;
O : out;
T : out;
end view;
alias Tristate_InView is Tristate_OutView'converse;

type Tristate_Interface_Vector is
array(natural range <>)
of Tristate_Interface;
end package;
76 changes: 76 additions & 0 deletions IO/I2C.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
-- EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
-- vim: tabstop=2:shiftwidth=2:noexpandtab
-- kate: tab-width 2; replace-tabs off; indent-width 2;
-- =============================================================================
-- Authors: Patrick Lehmann
--
-- Package: VHDL-2019 I²C interface descriptions
--
-- Description:
-- -------------------------------------
-- This package
--
-- Interface name: I2C (Inter-Integrated Circuit)
-- Alternative names: Two-Wire-Interface (TWI)
-- Can be reused for: PMBus, SMBus
-- Developed by: Philips / NXP Semiconductor
-- Standard/Manual: http://www.nxp.com/documents/user_manual/UM10204.pdf
-- Further links: https://en.wikipedia.org/wiki/I%C2%B2C
--
-- License:
-- =============================================================================
-- Copyright 2016-2020 Open Source VHDL Group
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- =============================================================================

library IEEE;
use IEEE.std_logic_1164.all;

use work.Common.all;

-- Signal name mappings
-- SCL -> Serial Clock
-- SDA -> Serial Data
package I2C is
-- Chip external interface (PCB level)
type I2C_PCB_Interface is record
SCL : std_logic;
SDA : std_logic;
end record;

view I2C_PCB_View of I2C_PCB_Interface is
SCL : inout;
SDA : inout;
end view;

type I2C_PCB_Interface_vector is
array(natural range <>)
of I2C_PCB_Interface;


-- Chip internal interface, not supporting bidirectional signals (fabric level)
type I2C_Interface is record
SCL : Tristate_Interface;
SDA : Tristate_Interface;
end record;

view I2C_ControllerView of I2C_Interface is
SCL : view Tristate_OutView;
SDA : view Tristate_OutView;
end view;
alias I2C_IOBView is I2C_ControllerView'converse;

type I2C_Interface_Vector is array(natural range <>) of I2C_Interface;

end package;
Loading