找回密码
 注册
关于网站域名变更的通知
查看: 200|回复: 1
打印 上一主题 下一主题

#技术风云榜#play with OpenRISC based atlys board(3)

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-11-30 15:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
#技术风云榜#play with OpenRISC based atlys board(3); C3 s3 Q% r- \9 L7 K8 V2 l! m

! G: D' Z7 l8 `#技术风云榜#play with OpenRISC based atlys board(1):https://www.eda365.com/forum.php?mod=viewthread&tid=469239&page=1&extra=#pid2131573
7 Y' l" L3 K4 z. {7 w1 S
3 i2 Y# K6 w0 }  m/ t#技术风云榜#play with OpenRISC based atlys board(2):https://www.eda365.com/forum.php?mod=viewthread&tid=469267&page=1&extra=#pid2131619
6 i2 V8 u% Z. m! i$ q# \' j2 u2 B4 x$ J5 M5 m
$ f, h4 @( a( S  o) S
3.Using ORPSoC3 {1 p' U9 F0 f5 p4 P7 w9 }5 n
9 H; Q8 c' ]  U6 H! I& ?- R+ ~6 m
Introduction8 f" c" _% E1 a+ \/ o
% `, b5 p- Z# {$ d6 Q; X

5 d9 x" d; Q# x' ^# k3 W: C- u  [ORPSoC  is intended to be a reference implementation of processors in the OpenRISC family. It provides a smallest-possible reference system, primarily for testing of the processors. It also provides systems intended to be synthesized and programmed on physical hardware. The reference system is the least complex implementation and consists of just enough to test the processor’s functionality. The board-targeted builds typically include many additional peripherals. For more information read the  ORPSoC User Guide  found in the doc directory of the ORPSoC installation.
9 ^' K" D* z; ?9 x( W- e% e2 F: F- H3 s& l; r6 y6 @6 C
Project organization
4 h. K: x8 {1 j( q- ]0 c( |9 u% @2 R2 B0 z5 V
4 E2 ]4 J5 H5 B% Y# _6 k% k
The ORPSoC project is intended to serve dual purposes. One is to act as a development platform for OpenRISC processors, and as a development platform of OpenRISC-based SoCs targeted at specific hardware. Organising a single project to satisfy these requirements can lead to some overlap and redundancy. The reference implementation based in the root (base directory) of the project contains enough components to create a simple OpenRISC-based SoC. Each board build is intended to implement as fully-featured a system as possible, depending on the targeted hardware. The project is organised in such a way that each board build can use both the reference implementation’s RTL modules and software, as well as its own set of RTL and software. The reference implementation is limited to what is available in the RTL and software directories in the root of the project, and is not technology dependent.
4 i' G( S4 |9 s1 v, }# a$ Z
+ E6 m& \5 J5 o4 E: X. PThe Atlys board1 T+ M) w/ y1 P
! T5 [4 [# I. {, h1 F0 e
We will start by finding the Atlys board setup. 8 I& ~2 T: e, [

: U0 ^! e0 Q  j( H7 u$ E, O- t
; U0 t* g  T; w& c
2 y3 n$ n, ?0 c( w9 r) }# I! W* S0 d1 f- }* }
& }7 a3 U$ r  q

0 J: K9 J- ~; Z& F9 h; h. lBefore we start6 ^- U! b8 a# u3 u' C/ X* o
: M% \, {) ^5 G4 n
Before we start the design phase we have to make sure the Xilinx  Design Suite is installed and that the environment variable XILINX is set. " e$ u* D1 p2 |, ]/ c$ Q& T

$ k9 y0 u) V9 q' b3 \; m & Q! N- J2 t8 i, s& G# Z( ~' c& ~

' d3 W  m! V+ g# `
% |8 J1 o8 s5 k5 f6 h: t . g) U+ }3 s$ T+ J  `7 d: |7 _, R
Design
1 f4 n  c8 L8 c  A9 ]
/ ?% K# K$ t9 fThe design is made up of a number of Verilog HDL files. They reside in two different directory. One directory that holds all the code that is common to all board designs found here:
. @7 w% u$ i4 b9 ^) Z
, ~8 ]; _: D$ F( O/ g  |  y  K' [: {0 k3 ]& ^& L4 Q' L
3 {: p( C) r0 |6 U

  w: B0 s: q* q" w4 Z
- i1 W( z- E0 V% E% w" u
" j+ A+ q, Y, J9 A& g& \And one board specific design directory as shown in the screenplot of the atlys board directory structure. The syntesis script will pick up all the Verilog design files to build the complete system.
5 i! k6 \# D. l9 z- d+ `. x2 M
5 n, r9 z! D7 d0 x
' y# Z  h* [1 k3 ~" K3 {8 Q# z# @3 Z' M$ @! ?) u/ C# P
Synthesis % h2 y$ {0 ?* i/ Y7 p1 q9 B7 M5 X/ w
! F! L  x& ]" \6 N. ~1 m
Synthesis of the board port for the Xilinx technology with the XST synthesis tool can be run in the board’s <syn/xst/run> path with the following command: <make all>
" \0 ?- L( I# ~6 g4 l' M2 z- @7 RThis will create an NGC file in <syn/xst/run> named <orpsoc.ngc>. Hopefully it’s all automated enough so that, as long as the design is simulating as desired, the correct set of RTL will be picked up and synthesized without any need for customising scripts for the tool. 5 g: |& q6 W* Q0 L. t- R
! ], t& W. B  ~( i7 l# Q
( ]$ q) _2 T7 y$ l  X7 |: w

, s( ]. L; q* B2 h$ k3 q
& e. y; o  p& a8 sUser constraints file
6 g/ J8 ]3 h9 e& l3 K( i# q/ B7 u6 y0 ~
& e) V# W) g! I4 t& ]1 Q( s$ ]/ D! c5 ?
A Xilinx User Constraints File (UCF) is in the board’s <backend/par/bin> path. It is named <atlys.ucf>. It should be edited if any extra I/O or constraints are required.; X' U% k. b1 J6 H8 @
5 J+ `( E2 D3 [/ q3 m

% j3 u5 j0 N  ~8 Y% O3 d% s5 X: v7 D- ^6 d' S, V  z1 Y4 O7 z2 q
Mappping and place & route  Z# \, l% G! }# e' r9 H
$ F; C" |! v  p  @2 N" M
! E' `, ]' }  ~. D
Mapping and place & route of the design can be run from the board’s <backend/par/run> path with the following command: <make orpsoc.ncd>. The makefile used can be found in the <......./boards/xilinx/atlys/backend/par/bin> directory. Here is an excerpt from the makefile showing the backend design flow:
9 p# v$ w  q9 L" R7 T6 o, f5 r2 w* E
4 x* B! u; x0 ?$ e, A* d5 Y
3 F. A6 J8 K2 d0 q4 i9 t' R1 G

" e) ^. G, q) u/ n' p
7 L- y. g" D3 _' p ! `% C8 @( f. E- `  J4 ]# B
8 D1 G9 H1 S2 G! J: ~) e$ K8 s
7 |2 A* |. e9 g( l( @* [9 J- i+ }# t# D
+ h. v8 A4 A. q. A

6 z5 ?$ y) t/ n/ b$ ^Place & route results0 @' e, [  P6 [9 f
) T8 e" L  n9 I0 Q7 J& Z; f

' u, u; ~5 Z) U. G+ ~The results from the place & route tool can be found in the logfile <orpsoc.par>:
2 x5 b) ?* B; Z0 H9 j: D1 ^- q" y7 K$ r' X/ j; W
, n+ U' r# G# u/ h9 ]5 t, q& K% k

" q  h0 w5 k  _; B) x, q7 m
" a% w; X$ E! q5 L1 s; U) b3 t* k + C0 C4 _8 H* K5 e( e. V; B, D/ Q
Options: _" ?& c- y: S) x7 ~8 {- l

, N7 {# |1 J2 j* D7 @6 n) k5 [- P9 Z1 R6 `: L& N$ X
To get a list of options that can be set when running the backend flow, run the following command:6 k+ L( |: ?. n3 l$ i. U

( g; e3 O* \% A3 x' H+ Z. J
* ]1 Y- v! @3 u2 k2 Jmake print-config
( x7 ~2 c, Y! \4 ?3 ^6 M 5 P6 D) D/ W6 Q9 ^( g
" M6 k; A5 W0 _2 M. S
; E# x" {9 o9 ^2 i* x/ p

" f% k7 ]3 _# A+ _) z; S' F, ~3 c7 v* J) a7 ~; H! o1 A3 F! \% r

8 w, n2 z5 R) y( ~: Z. rGenerate timing report2 A: w8 Y. ^1 p" c/ Q5 H
1 D$ q; S3 [- X: p

" d6 l' J4 f- r. ~! j7 O- rThe trace tool can be used to generate a timing report of the post-place and route design: ! c" m. S% Q  X" d( [+ ]

' m2 q( l  p6 B! Hmake timingreport 7 ~" y5 N6 Q+ N$ @

- O+ G5 x% V# B3 [) p8 Y * m& K$ X) T8 K4 Q2 [; ?5 v5 c

+ D0 f5 i" a% a; u; G1 d3 z
4 ~8 C( h7 S, R
. v* q1 F6 V& Q" t& Y0 |5 {% fHere is the result:
% M4 C1 x+ W3 Z# E
  A" n/ T1 W% E; R   z! _* T! `3 ^9 _7 M

  f$ \( t1 ?3 m2 v+ r
+ Y4 |: l0 u# C0 b$ _5 I& D
/ _. L; I* C+ u% E) j+ L8 D& D) }1 V. a9 O; I- z1 t
We have 1338 timing errors. Before we continue we have to investigate these errors. The timing report result file is called <orpsoc.twr>. Analyzing the this we find the following timing errors. 9 w. j& {) o4 R( a7 n- K% M
0 B! @* u5 R( s6 E

0 I3 a: c6 c$ f
: X; W9 w" ^/ _) I+ F( C
7 L/ l. P: o' ]0 i* E2 e* ]$ j4 x* u1 k! b/ s& ]2 B

0 X, P* _2 G% W" |# |7 t3 k( }) |5 N" p- }: t
0 y7 I) D6 l, \! ]4 p
Without knowing to much about the design it is hard to figure out what is wrong. Let's setup a simulation environment and analyze what's going on (see next chapter). # X3 h9 z" e) K0 z& m& [$ Q; U: _

' W" g* m5 ?0 j" ^Generating the bitstream file
& b# y; u- W8 ]% v9 e; T1 l, D5 s6 T4 p* |0 c1 x' a
The bitstream file is used to configure the FPGA device. The configuration file generation is run from the .../atlys/backend/par/run directory using the command:  make orpsoc.bit
. I8 W4 d9 U' t6 k. d1 L; b6 S# r" r' [
1 e+ d% e6 ]0 E& y
, C% `* L. W. ~% z7 ~+ ^
- o, r9 {- X  \. B$ I1 w* T6 h

3 [5 D$ I6 I0 i" Z
' ~; w5 @5 ?4 g3 `Downloading the bitstream5 s, ~0 Q% A: y6 F: W8 N% c7 l
4 H2 r; s% G% N# S; G  ]) j/ a
We are going to use the Xilinx configuration tool called iMPACT to configure the SPARTAN-6 FPGA on the Atlys board. The first thing we have to do is connecting our board to the computer we use for our development work using a USB cable.
, U/ A: s- C$ i9 ~
3 }1 a8 F, X  F* }
/ K+ h/ n" x4 d+ J7 P; p+ d& S
3 T6 X; \; y5 X, u1 E- O2 i1 Z& x: W1 C. ~
Then start iMPACT. ! [$ T4 R$ p2 B
3 c' t& }( R* U' H5 Q, A7 J

8 T0 i/ c6 u2 ?$ xl   
1 D1 b3 ?, q5 Y9 i, C0 N, Q: \; P) Z6 x. E* Q
3 k* K. D3 j5 Y6 ], Q! g% B

4 D- s. v8 _7 I1 A7 _We will create a new iMPACT project. 7 x2 |  K2 ~: r
$ a* v: b% F8 J1 l- [( d9 H

& k2 Q, \1 ?& M7 [3 J9 E) p7 R + }7 M/ j" P' A8 W' P6 _1 D
5 |* l0 k2 y! d

& v5 ]& S+ T9 | We are going to use JTAG to configure the device.# L, s4 v; r) J1 m; Z: `

8 z8 P0 w5 G4 ?. p" O7 w" [1 e1 E4 e8 ?

. p8 ]6 d. I2 T8 D# {. M$ M* n1 e" _
7 G; X% ?  t* T4 M' j  " ~, s" v. r% `' I

) I( ?+ G  M  U5 wThe iMPACT tool will connect to the boundary scan chain on the board and identify the FPGA.% ^3 ?8 w1 n8 Z- ~. d9 @
# x. `1 l$ D6 p2 g

/ M" x* q* b6 D- |% Y0 \/ ~ / x# c, \' H9 `% B; C

' V$ P" E9 j( |6 m2 h# n 5 @7 e/ }  g3 `8 V
: [' c  h0 @% t( I
To add a configuration file we right-click the FPGA icon and select <Assign New Configuration File> and find the configuration file <orpsoc.bit>.
' s, Q# {3 O0 U" y# a1 a# w  I9 f

3 W4 b) {! E2 ^8 ]& r  F + e8 X9 B& X5 f+ G: A. J

. \$ \+ C6 C2 D  
  b: ~2 ~) {9 V+ f( C3 oWhen double-clicking the Program operation entry the configuration will start. After a few seconds the configuration has finished.
/ c$ V8 P) j/ o4 e8 |  i

该用户从未签到

2#
发表于 2020-11-30 16:47 | 只看该作者
play with OpenRISC based atlys board
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-6-28 11:26 , Processed in 0.093750 second(s), 23 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表