[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9634 - in gnuradio/trunk/usrp2/firmware: apps lib
From: |
matt |
Subject: |
[Commit-gnuradio] r9634 - in gnuradio/trunk/usrp2/firmware: apps lib |
Date: |
Sun, 21 Sep 2008 11:52:02 -0600 (MDT) |
Author: matt
Date: 2008-09-21 11:52:01 -0600 (Sun, 21 Sep 2008)
New Revision: 9634
Added:
gnuradio/trunk/usrp2/firmware/apps/test_ram.c
Modified:
gnuradio/trunk/usrp2/firmware/apps/
gnuradio/trunk/usrp2/firmware/apps/Makefile.am
gnuradio/trunk/usrp2/firmware/lib/memory_map.h
Log:
new app to test the ram
Property changes on: gnuradio/trunk/usrp2/firmware/apps
___________________________________________________________________
Name: svn:ignore
- *-stamp
*.a
*.bin
*.dump
*.log
*.rom
*.map
.deps
Makefile
Makefile.in
aclocal.m4
autom4te.cache
blink_leds
blink_leds2
build
compile
config.h
config.h.in
config.log
config.status
configure
depcomp
echo
eth_test
gen_eth_packets
ibs_rx_test
ibs_tx_test
install-sh
libtool
ltmain.sh
missing
py-compile
rcv_eth_packets
run_tests.sh
stamp-h1
test1
test_phy_comm
timer_test
buf_ram_test
buf_ram_zero
hello
test_printf
test_spi
test_i2c
gen_pause_frames
test_serdes
rx_only
tx_only
tx_standalone
tx_drop
tx_drop2
tx_drop_rate_limited
test_lsdac
test_lsadc
read_dbids
test_db_spi
ramp_lsdac
eth_to_serdes
serdes_to_dsp
sd_gentest
sd_bounce
can_i_sub
tx_only_v2
rx_only_v2
txrx
eth_serdes
serdes_txrx
set_hw_rev
test_sd
factory_test
+ *-stamp
*.a
*.bin
*.dump
*.log
*.rom
*.map
.deps
Makefile
Makefile.in
aclocal.m4
autom4te.cache
blink_leds
blink_leds2
build
compile
config.h
config.h.in
config.log
config.status
configure
depcomp
echo
eth_test
gen_eth_packets
ibs_rx_test
ibs_tx_test
install-sh
libtool
ltmain.sh
missing
py-compile
rcv_eth_packets
run_tests.sh
stamp-h1
test1
test_phy_comm
timer_test
buf_ram_test
buf_ram_zero
hello
test_printf
test_spi
test_i2c
gen_pause_frames
test_serdes
rx_only
tx_only
tx_standalone
tx_drop
tx_drop2
tx_drop_rate_limited
test_lsdac
test_lsadc
read_dbids
test_db_spi
ramp_lsdac
eth_to_serdes
serdes_to_dsp
sd_gentest
sd_bounce
can_i_sub
tx_only_v2
rx_only_v2
txrx
eth_serdes
serdes_txrx
set_hw_rev
test_sd
factory_test
test_ram
Modified: gnuradio/trunk/usrp2/firmware/apps/Makefile.am
===================================================================
--- gnuradio/trunk/usrp2/firmware/apps/Makefile.am 2008-09-21 17:49:44 UTC
(rev 9633)
+++ gnuradio/trunk/usrp2/firmware/apps/Makefile.am 2008-09-21 17:52:01 UTC
(rev 9634)
@@ -38,6 +38,7 @@
test_db_spi \
test_i2c \
test_sd \
+ test_ram \
test_phy_comm \
test_lsadc \
test_lsdac \
Added: gnuradio/trunk/usrp2/firmware/apps/test_ram.c
===================================================================
--- gnuradio/trunk/usrp2/firmware/apps/test_ram.c
(rev 0)
+++ gnuradio/trunk/usrp2/firmware/apps/test_ram.c 2008-09-21 17:52:01 UTC
(rev 9634)
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <u2_init.h> /* FIXME */
+#include <sd.h>
+#include <string.h>
+#include <hal_io.h>
+#include <nonstdio.h>
+#include <hal_uart.h>
+
+#define ASSERT_TRUE(x) \
+ do { \
+ if (!(x)){ \
+ printf("ASSERT_TRUE failed on line %d\n", __LINE__); \
+ nerrors++; \
+ } \
+ } while(0)
+
+#define ASSERT_FALSE(x) \
+ do { \
+ if (x){ \
+ printf("ASSERT_FALSE failed on line %d\n", __LINE__); \
+ nerrors++; \
+ } \
+ } while(0)
+
+
+#define BUFSIZE 128
+
+int
+main(void)
+{
+ int i,j,k;
+ unsigned char buf[512];
+
+ u2_init();
+ //hal_uart_init();
+ //puts("\ntest_ram\n");
+
+ output_regs->ram_page = 0;
+
+ //puts("r[0]=DEADBEEF\n");
+ extram[0] = 0xDEADBEEF;
+ extram[1] = 0xF00D1234;
+ extram[7] = 0x76543210;
+ puts("RD\n");
+ i = extram[0];
+ k = extram[1];
+ j = extram[7];
+ //puts("r0=");
+
+ puthex32_nl(i);
+ puthex32_nl(k);
+ puthex32_nl(j);
+ puts("Done");
+ hal_finish();
+ return 0;
+}
+
Modified: gnuradio/trunk/usrp2/firmware/lib/memory_map.h
===================================================================
--- gnuradio/trunk/usrp2/firmware/lib/memory_map.h 2008-09-21 17:49:44 UTC
(rev 9633)
+++ gnuradio/trunk/usrp2/firmware/lib/memory_map.h 2008-09-21 17:52:01 UTC
(rev 9634)
@@ -353,6 +353,7 @@
volatile uint32_t leds;
volatile uint32_t phy_ctrl; // LSB is reset line to eth phy
volatile uint32_t debug_mux_ctrl;
+ volatile uint32_t ram_page; // FIXME should go somewhere else...
} output_regs_t;
#define SERDES_ENABLE 8
@@ -578,6 +579,15 @@
#define sdspi_regs ((sdspi_regs_t *) SDSPI_BASE)
///////////////////////////////////////////////////
+// External RAM interface, Slave 14
+// Pages are 1K. Page is 10 bits, set by a control register
+// output_regs->ram_page
+#define EXTRAM_BASE 0xF000
+#define extram ((volatile uint32_t *) EXTRAM_BASE)
+
+
+///////////////////////////////////////////////////
+
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9634 - in gnuradio/trunk/usrp2/firmware: apps lib,
matt <=