Hi I have a MachXO2 Device LCMXO2-7000HE. In my design I have the Lattice Mico8 softcore with Wishbone interface (downloaded Reference design). Then I have an EFB block where I want to use the UFM. There are other peripherials to the controller such as UART and they all work fine. But I don't manage to get the communication going with the UFM. Maybe I am doing something wrong with the protocol or timing. Can anyone provide me a reference code where I can see how the communication with the UFM via Wishbone is done. Any help appreciated. Sincerely
Guest
#4092383
How to access the UFM you will find in this docoument page 73 ff http://www.latticesemi.com/view_document?document_id=46300
Thanks I actually studied that document already, but I am still not able to establish communication. That is why I ask if someone can provide me a working reference code either in C or assembler. But maybe you are right, I have to analyze the wishbone signals with an logic analyzer to see whether I meet the timings exactly as described in this document. Sincerely
Guest
#4092528
Sorry i can't provide a sample for the Mico8, only general help. (i have used a simple FSM to read one page in my projects) Don't worry about the WB timing, the Mico8 core should do it correctly.
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | |
51 | |
52 | |
53 | |
54 | |
55 | |
56 | |
57 | |
Thanks Lattice User My Assembler Code in Mico8 looks like this. Here I try to read the device ID as you suggested in the first post. When I read back the Device ID into register r17-20 I just got all zeros in it. I guess I have to analyse with a Logic Analyzer to see what is wrong. What is your opinion on this code
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
Guest
#4092834
Hmmmm What memory modell are you using? For medium modell my version of the LM8 reference modell documents R13 as page pointer. From your code it looks like you are using R15.
Yes I have r15 and r14 as address register. I actually dont know what memory model I use, but it is the Reference Design RD1026 configured to 32 General Purpose registers.
Guest
#4092891
Which version of the Mico8 are you using? The latest 3.15 supports three meory modes: small: no page pointer medium: R13 is page pointer large: R13,R14,R15 is page pointer
I analyzed the Wishbone signals and surprise: the UFM block actually respond to the Read Device ID request. However, due to some timing issues the Mico8 importi implementation somehow is not able to capture the response from the UFM. My version of Mico8 is 3.1. I think I might have to update it to 3.15 as I infer by your comments. This might help. Ok see you later, maybe I can do it by Friday. Sincerely
Reply
Please log in before posting.