Göm meny

Laborations TSEA44

Errata 2019

In this section you can see our internal TODO list for things that need to be corrected in the lab compendium and the lab skeleton.

gtkterm stuck when sending file

The gtkterm application get stuck when sending files (file->send raw). Use instead cat in a terminal window to send a file to the board (while keeping gtkterm open).
  cat file.hex > /dev/ttyUSBx
Replace x with the port number used in gtkterm.

Lab1-4 in the labskeleton

  • Missing entries in tsea44/hw/Makefile for make targets including glbl. A new version of the Makefile can be found here (and has been included in tsea44.tgz): Makefile

News 2018

Support for sdf-file netlist simulation of lab0 (the sim_lab0_sdf makefile target) require that two files (Makefile and modelsim.ini) found at the end of this page are copied into tsea44/hw/Makefile and tsea44/hw/simulator/modelsim.ini.

Hardware for Lab1-Lab4 is connected to the computers MUX1-00, MUX1-02, MUX1-05, MUX1-09, MUX1-11, MUX1-14. Please leave the hardware powered on, as it will allow anyone logging in from ixtab to work.

Errata 2017

In this section you can see our internal TODO list for things that need to be corrected in the lab compendium and the lab skeleton.

Lab 0 labskeleton

  • Missing tsea44/hw/lab0.ucf file. A copy can be found here: lab0.ucf

Lab 0 description

  • Laboration task 0.1, task d: Copy the design in lab0_zed.sv and put that in lab0.sv. Modify the clock frequency, and modify (if necessary) the testbench file dafk/lab0_tb.sv

Errata 2016

In this section you can see our internal TODO list for things that need to be corrected in the lab compendium and the lab skeleton.

Lab manual introduction

  • It seems that the old logo is still used on the front cover of the lab manual. If you have printed the lab manual, please remove that part of the lab manual.

Lab 0

  • Section 2.4: replace "textttygtkterm" with "gtkterm"
  • Use of ssh to another computer may sometimes not work. Gtkterm will then not open the serial port (port not available or similar message). The simplest (but not best) is to reboot the computer.

Lab 1

  • Section 3.6.1: replace "/nobackup/local/<your name>/" with "/tmp/<your name>/"

News 2016

  • Lab0 can be run using the post layout simulation if the following two changes are made to the lab skeleton:
    replace tsea44/hw/Makefile with this new Makefile
    replace tsea44/hw/simulator/modelsim.ini with this new modelsim.ini
    Run the post layout simulation using make sim_lab0_sdf

News 2014

  • To speed up simulations the directory work has been moved to /nobackup/local/<user>/work
  • Likewise to speed up synthesis the directory synthdir has been moved to /nobackup/local/<user>/synthdir
  • However if you are not in Muxen (i.e. Egypten, Asgård, Olympen, Southfork) the directory /nobackup/local does not exist. You must make changes to the Makefile. Replace /nobackup/local with /tmp

Errata 2015

In this section you can see our internal TODO list for things that need to be corrected in the lab compendium and the lab skeleton.

Lab manual introduction

  • It seems that the old logo is still used on the front cover of the lab manual. If you have printed the lab manual, please remove that part of the lab manual.

Lab 0

  • Section 2.3.1: You can build the design by using the command make lab0.bit instead of make lab0.
  • Section 2.4: The serial port is now /dev/ttyS0 instead of /dev/ttyUSB0

Lab 1

  • We have changed JTAG cables. Please rename utils/download_old.sh to utils/download.sh to be able to use the new cables.

Lab 2

  • It seems as if an extra #endif statement was added to the file hw/monitor/firmware/src/jdct.c at some point in the init_image() function. Just remove that #endif statement and it should compile as expected.

Lab 3

Lab 4


A couple of test cases

The test image testbild, size 512x400.

The cropped test image wunderbart, size 320x240.

 

About rounding

We recommend that you use rounding without bias (round half away from zero).
See for instance about rounding in Wikipedia.
A piece of code, that does quantization and rounding:

temp = temp*rval;
rnd = (temp & 0x10000) != 0 ;
bits = (temp & 0xffff) != 0;
pos = (temp & 0x80000000) == 0;
temp = temp >> 17;
temp += rnd && (pos || bits);

 

Case 1

MATLAB test program

1) Before transform: a=

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 58 59 60 61 62 63 64

2) After sqrt(8)*DCT1[a-128] (and truncating) on the rows

-988 -19 0 -2 0 -1 0 -1
-924 -19 0 -2 0 -1 0 -1
-860 -19 0 -2 0 -1 0 -1
-796 -19 0 -2 0 -1 0 -1
-732 -19 0 -2 0 -1 0 -1
-668 -19 0 -2 0 -1 0 -1
-604 -19 0 -2 0 -1 0 -1
-540 -19 0 -2 0 -1 0 -1

3) After another sqrt(8)*DCT1 (and truncating),
now on the columns,
we have 8*DCT2[a-128] =  

-6112 -152 0 -16 0 -8 0 -8
-1167 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
-122 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
-37 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
-10 0 0 0 0 0 0 0

4) The quantization matrix is given by Q =

16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99

5) After quantization the result should be
Y = round(8*B/(8*Q*1/2))
(1/2 is a quality factor used by jpegfiles)

-96 -3 0 0 0 0 0 0
-24 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
-2 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

 

Case 2:

1) chess board in the upper left corner of wunderbart)

0 255 0 255 0 255 0 255
255 0 255 0 255 0 255 0
0 255 0 255 0 255 0 255
255 0 255 0 255 0 255 0
0 255 0 255 0 255 0 255
255 0 255 0 255 0 255 0
0 255 0 255 0 255 0 255
255 0 255 0 255 0 255 0

2) After transform&quantization

-1 0 0 0 0 0 0 0
0 -6 0 -4 0 -2 0 -6
0 0 0 0 0 0 0 0
0 -5 0 -3 0 -2 0 -6
0 0 0 0 0 0 0 0
0 -3 0 -2 0 -2 0 -6
0 0 0 0 0 0 0 0
0 -4 0 -4 0 -6 0 -17

 

Case 3:

1) (next chess board in the upper left corner of wunderbart)

0 0 255 255 0 0 255 255
0 0 255 255 0 0 255 255
255 255 0 0 255 255 0 0
255 255 0 0 255 255 0 0
0 0 255 255 0 0 255 255
0 0 255 255 0 0 255 255
255 255 0 0 255 255 0 0
255 255 0 0 255 255 0 0

2) After transform&quantization

-1 0 0 0 0 0 0 0
0 -24 0 -31 0 7 0 1
0 0 0 0 0 0 0 0
0 -35 0 -42 0 9 0 2
0 0 0 0 0 0 0 0
0 11 0 13 0 -5 0 -1
0 0 0 0 0 0 0 0
0 1 0 1 0 -1 0 0

 

Case 4:

1) (and next chess board in the upper left corner of wunderbart)

0 0 0 0 255 255 255 255
0 0 0 0 255 255 255 255
0 0 0 0 255 255 255 255
0 0 0 0 255 255 255 255
255 255 255 255 0 0 0 0
255 255 255 255 0 0 0 0
255 255 255 255 0 0 0 0
255 255 255 255 0 0 0 0

2) After transform&quantization

-1 0 0 0 0 0 0 0
0 -140 0 31 0 -7 0 6
0 0 0 0 0 0 0 0
0 35 0 -7 0 2 0 -2
0 0 0 0 0 0 0 0
0 -11 0 2 0 -1 0 1
0 0 0 0 0 0 0 0
0 4 0 -1 0 1 0 -1

File name  Size  Last Modification Time
Makefile   16K 22 November 2018 00:19
Makefile_2016   14K 14 November 2016 16:23
modelsim.ini   19K 22 November 2018 00:35
modelsim.ini_2016   19K 14 November 2016 16:25


Informationsansvarig: Kent Palmkvist
Senast uppdaterad: 2019-11-22