OpenCores
URL https://opencores.org/ocsvn/ssbcc/ssbcc/trunk

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [peripherals/] [tb/] [UART_Rx/] [run] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
#!/bin/bash
2
# Copyright 2013, Sinclair R.F., Inc.
3
 
4
NAME=UART_Rx
5
 
6
cat < good
7
48
8
65
9
6c
10
6c
11
6f
12
20
13
57
14
6f
15
72
16
6c
17
63
18
12
19
0d
20
0a
21
00
22
EOF
23
 
24
# Test +/-2.7% and 0% baud rates.
25
cp tb_UART_Rx.s-normal tb_UART_Rx.s;
26
for baud in 112089 115200 118310; do
27
  sed -e "s/115200/${baud}/" tb_${NAME}.9x8-good > tb_${NAME}.9x8;
28
  ../../../../../ssbcc -q -P monitor_stack tb_${NAME}.9x8 || { echo "${NAME} compile failed" > /dev/stderr; exit 1; }
29
  iverilog -o tb tb.v tb_${NAME}.v || { echo "${NAME} build failed" > /dev/stderr; exit 1; }
30
  ./tb > tb.out;
31
  if ! cmp -s tb.out good; then
32
    echo "${NAME} failed testing baud rate:  ${baud}" > /dev/stderr;
33
    exit 1;
34
  fi
35
done
36
 
37
# Partial test for input FIFO.
38
cp tb_UART_Rx.s-fifo tb_UART_Rx.s;
39
sed -e "s/G_BAUD$/G_BAUD inFIFO=16/" tb_${NAME}.9x8-good > tb_${NAME}.9x8;
40
../../../../../ssbcc -q -P monitor_stack tb_${NAME}.9x8 || { echo "${NAME} compile failed" > /dev/stderr; exit 1; }
41
iverilog -o tb tb.v tb_${NAME}.v || { echo "${NAME} build failed" > /dev/stderr; exit 1; }
42
./tb > tb.out
43
if ! cmp tb.out good; then
44
  echo "${NAME} FIFO test failed" > /dev/stderr;
45
  exit 1;
46
fi
47
 
48
echo "Passed:  ${NAME}";
49
exit 0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.