-
Notifications
You must be signed in to change notification settings - Fork 568
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
fixes for apicula support #2043
Conversation
litex/build/gowin/apicula.py
Outdated
devicename = self.platform.devicename | ||
# Non-exhaustive list of family aliases that Gowin IDE supports but don't have a unique database | ||
if devicename == "GW1NR-9C": | ||
devicename = "GW1N-9C" | ||
elif devicename == "GW1NR-9": | ||
devicename = "GW1N-9" | ||
elif devicename == "GW1NSR-4C" or devicename == "GW1NSR-4": | ||
devicename = "GW1NS-4" | ||
elif devicename == "GW1NR-4C" or devicename == "GW1NR-4": | ||
devicename = "GW1N-4" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using a dict as done for xilinx ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there is a many to one relationship and I doubt a dict is faster for small numbers but also because I ported it from C. I don't really have strong feelings one way or the other.
for |
It makes sense but I don't wanna 😭 getting their stuff to work on Arch is such a pain, which is why we use docker. Our rPLL has exactly the same ports and parameters as the Gowin one, as documented in their clock primitive docs. The more important thing to verify is that there aren't any other parameter changes that need adjustment. |
I did some digging and found an old datasheet with the original PLL documentation, which allowed me to diff the actual changes in rPLL: --- pll.vhdl 2024-08-21 10:29:48.268678073 +0200
+++ rpll.vhdl 2024-08-21 10:21:43.595398786 +0200
@@ -1,5 +1,5 @@
architecture Behavioral of Four_Bit_Adder is
- component PLL
+ component rPLL
generic
(
FCLKIN : string := "100.0";
@@ -27,15 +27,13 @@
);
port
(
- CLKIN : in std_logic_vector;
+ CLKIN : in std_logic;
CLKFB : in std_logic;
IDSEL : in std_logic_vector(5 downto 0);
FBDSEL : in std_logic_vector(5 downto 0);
ODSEL : in std_logic_vector(5 downto 0);
- RESET : in std_logic := '0';
- RESET_P : in std_logic := '0';
- RESET_I : in std_logic := '0';
- RESET_S : in std_logic := '0';
+ RESET : in std_logic;
+ RESET_P : in std_logic;
PSDA, FDLY : in std_logic_vector(3 downto 0);
DUTYDA : in std_logic_vector(3 downto 0);
LOCK : out std_logic; as you can see the main change is the removal of those two reset parameters, and CLKIN is no longer a vector(???), other than that they are the same primitive with the same parameters and ports. |
That's all for currently working boards |
I will try to build/test bitstreams with gowin toolchain and your PLL's modification to check messages/behavior |
Actually I should just get the gowin tools working to test both there PRs |
Confirmed working with Gowin IDE |
Applied. Thanks @pepijndevos |
This maps Gowin IDE device families to Apicula database names, and updates the PLL generator to use the "revised PLL" primitive, which is basically the same as the PLL primitive but I guess they made some breaking changes to the implementation.
Stand by while I test more Gowin boards on Apicula in https://github.com/litex-hub/litex-boards/pull/603/files