mirror of
https://github.com/livingcomputermuseum/UniBone.git
synced 2026-05-04 23:16:32 +00:00
PRU1 code split into multiple images 1. test functions 2. UNIBUS operation PRU1 bus latch interface Write byte/bits access not with MACROS (random optimizer influence), now with *_helper() procedures. Same timing, more determinism, much code saving. Nono more ASM code to write PRU0 XFER area. demo: menu to test UNIBUS signals directly rework "Arbitration" logic: now 3-fold Rework of UNIBUs arbtiration: NONE/CLIENT/MASTER - no Arbitrator (SACK penidng for 11/34 Konsole) (NONE) - phyiscal PDP_11 CPU is Arbitrator (CLIENT) - UniBone implements Arbitrator (MASTER) - Same PRU code loop handles all arbitration types PRU buslatch timing slower, for some problematic PCBs More aggressive bus latch selftest (mixed patterns, running on PRU now) Refinement of ready-to-run scripts - Adapted to changed "demo" menu - new name scheme <OS>_<boot- drive>_<PDP-11CPU> indicates - which OS is run - which disk emulation is used and what is the boot device - what is the (minimum) PDP-11 to run that Merged in Joshs DMA timing for 11/84 UNIBUS master cycles waits 350 us before MSYN, instead 150. Merged in Joshs DMA request queue multiple devices canrequest INTR and DMAs concurrently, will be put on the bus sequentially Merged in Joshs MSCP driver - Build RT-11v5.5 for MSCP - added boot loader "du.lst" MSCP run scrips 2.11BSD on MSCP on PDP-11/44 RT11 on MSCP Fix: image file sizing Disk image file exptend automatically if block beyond current file end is written
98 lines
3.2 KiB
C++
98 lines
3.2 KiB
C++
/* pru.hpp: Management interface to PRU0 & PRU1.
|
|
|
|
Copyright (c) 2018, Joerg Hoppe, j_hoppe@t-online.de, www.retrocmp.com
|
|
|
|
All rights reserved.
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions
|
|
are met:
|
|
|
|
- Redistributions of source code must retain the above copyright
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
- Redistributions in binary form must reproduce the above copyright
|
|
notice, this list of conditions and the following disclaimer in the
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
- Neither the name of the copyright holder nor the names of its
|
|
contributors may be used to endorse or promote products derived from
|
|
this software without specific prior written permission.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
18-apr-2019 JH added PRU code dictionary
|
|
12-nov-2018 JH entered beta phase
|
|
*/
|
|
|
|
#ifndef _PRU_HPP_
|
|
#define _PRU_HPP_
|
|
|
|
#include <stdint.h>
|
|
#include "prussdrv.h"
|
|
|
|
#include "logsource.hpp"
|
|
|
|
|
|
|
|
/*** PRU Shared addresses ***/
|
|
// Mailbox page & offset in PRU internal shared 12 KB RAM
|
|
// Accessible by both PRUs, must be located in shared RAM
|
|
// offset 0 == addr 0x10000 in linker cmd files for PRU0 AND PRU1 projects.
|
|
// For use with prussdrv_map_prumem()
|
|
#define PRUSS_MAX_IRAM_SIZE 8192
|
|
|
|
// all entry addresses at 0
|
|
// code entry point "_c_int00_noinit_noargs" from linker map file:
|
|
#define PRU0_ENTRY_ADDR 0x00000000
|
|
#define PRU1_ENTRY_ADDR 0x00000000
|
|
|
|
|
|
#ifndef PRU_MAILBOX_RAM_ID
|
|
#define PRU_MAILBOX_RAM_ID PRUSS0_SHARED_DATARAM
|
|
#define PRU_MAILBOX_RAM_OFFSET 0
|
|
#endif
|
|
|
|
// Device register page & offset in PRU0 8KB RAM mapped into PRU1 space
|
|
// offset 0 == addr 0x2000 in linker cmd files for PRU1 projects.
|
|
// For use with prussdrv_map_prumem()
|
|
#ifndef PRU_DEVICEREGISTER_RAM_ID
|
|
#define PRU_DEVICEREGISTER_RAM_ID PRUSS0_PRU0_DATARAM
|
|
#define PRU_DEVICEREGISTER_RAM_OFFSET 0
|
|
#endif
|
|
|
|
|
|
|
|
|
|
class pru_c: public logsource_c {
|
|
public:
|
|
// IDs for code variants, so callers can select one
|
|
enum prucode_enum {
|
|
PRUCODE_EOD = 0, // special marker: end of dictionary
|
|
PRUCODE_NONE = 0, // no code running, RPU reset
|
|
PRUCODE_TEST = 1, // only selftest functions
|
|
PRUCODE_UNIBUS = 2 // regular UNIBUS operation
|
|
// with or without physical CPU for arbitration
|
|
} ;
|
|
public:
|
|
enum prucode_enum prucode_id ; // currently running code
|
|
|
|
pru_c();
|
|
int start(enum prucode_enum prucode_id);
|
|
int stop(void);
|
|
};
|
|
|
|
extern pru_c *pru; // singleton
|
|
|
|
#endif
|