summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Lange <b.lange@hzdr.de>2011-08-02 14:17:00 +0200
committerBert Lange <b.lange@hzdr.de>2011-08-02 14:17:00 +0200
commitbb1b38ce7d74dbf5ff5bb57576011ed825a8330d (patch)
tree22b1bcc292b5d5dc0d6fd55458f38cd570cb9306
parentb9ad801c86a4bf2f37be4972737b9c401335a49c (diff)
downloadzpu-bb1b38ce7d74dbf5ff5bb57576011ed825a8330d.zip
zpu-bb1b38ce7d74dbf5ff5bb57576011ed825a8330d.tar.gz
change: prettier logifle output
-rw-r--r--zpu/hdl/example/log.txt75
-rw-r--r--zpu/hdl/zpu4/src/io.vhd24
2 files changed, 38 insertions, 61 deletions
diff --git a/zpu/hdl/example/log.txt b/zpu/hdl/example/log.txt
index a8b4893..6ee1d94 100644
--- a/zpu/hdl/example/log.txt
+++ b/zpu/hdl/example/log.txt
@@ -1,55 +1,20 @@
-N
-o
-
-i
-n
-t
-e
-r
-r
-u
-p
-t
-
-
-
-
-
-
-G
-o
-t
-
-i
-n
-t
-e
-r
-r
-u
-p
-t
-
-
-
-
-
-
-N
-o
-
-i
-n
-t
-e
-r
-r
-u
-p
-t
-
-
-
-
-
-
+Hello world 1
+
+Hello world 2
+
+Hello world 1
+
+Hello world 2
+
+Hello world 1
+
+Hello world 2
+
+Hello world 1
+
+Hello world 2
+
+Hello world 1
+
+Hello world 2
+
diff --git a/zpu/hdl/zpu4/src/io.vhd b/zpu/hdl/zpu4/src/io.vhd
index 159df6f..f05b29b 100644
--- a/zpu/hdl/zpu4/src/io.vhd
+++ b/zpu/hdl/zpu4/src/io.vhd
@@ -56,7 +56,11 @@ begin
timer_we <= writeEnable and addr(12);
process(areset, clk)
- variable taddr : std_logic_vector(maxAddrBit downto 0);
+ variable taddr : std_logic_vector(maxAddrBit downto 0);
+ -- pragma translate_off
+ variable line_out : line := new string'("");
+ variable char : character;
+ -- pragma translate_on
begin
taddr := (others => '0');
taddr(maxAddrBit downto minAddrBit) := addr;
@@ -69,17 +73,25 @@ begin
-- external interface (fixed address)
--<JK> extend compare to avoid waring messages
if ("1" & addr & lowAddrBits)=x"80a000c" then
- report "Write to UART[0]" & " :0x" & hstr(write);
-- Write to UART
- -- report "" & character'image(conv_integer(memBint)) severity note;
- print(l_file, character'val(to_integer(unsigned(write))));
+ report "Write to UART[0]" & " :0x" & hstr(write);
+ -- pragma translate_off
+ char := character'val(to_integer(unsigned(write)));
+ if char = lf then
+ std.textio.writeline( l_file, line_out);
+ else
+ std.textio.write( line_out, char);
+ end if;
+ -- pragma translate_on
+
elsif addr(12)='1' then
report "Write to TIMER" & " :0x" & hstr(write);
-- report "xxx" severity failure;
-- timer_we <= '1';
+
else
- print(l_file, character'val(to_integer(unsigned(write))));
- report "Illegal IO write @" & "0x" & hstr(taddr) severity warning;
+
+ report "Illegal IO write @" & "0x" & hstr(taddr) severity warning;
end if;
end if;
OpenPOWER on IntegriCloud