Added connection generation

This commit is contained in:
Borna Rajković committed 2022-05-25 07:39:45 +02:00
1 parent cbff8ff5f2
commit 5cf8235608
16 files changed
+440 -35

No files matched your search

@@ -0,0 +1,53 @@
// Version 0.0.1
#include "libraries\frisc\vjezba1\FRISC.cdl"
#include "libraries\frisc\vjezba1\memory.cdl"
component System
{
clock 100MHz;
//directRam
wire INT;
//glavnaSabirnica
wire<32> ADR;
wire<32> DATA;
wire READ;
wire WRITE;
wired_and WAIT;
wired_and INT0;
wired_and INT1;
wired_and INT2;
wired_and INT3;
wire<3> SIZE;
wire --IACK;
wire --BREQ;
wire --BACK;
// components --------------------------------------------
subcomponent Memorija memorija<false, 1, 65536, 8, 0>(ADR, DATA, READ, WRITE, SIZE, WAIT, INT);
subcomponent FRISC procesor(ADR, DATA, READ, WRITE, SIZE, WAIT, INT0, INT1, INT2, INT3, --IACK, 1, *, INT) uses memorija;
display {
component { x: -12; y: 68; ref: "memorija"; }
component { x: -206; y: -76; ref: "procesor"; }
// directRam bus
// glavnaSabirnica bus
rectangle {
x: -222; y: 130;
w: 100; h: 20;
}
line {x1:-28; y1:96; x2:-90; y2:-26;}
line {x1:38; y1:52; x2:-171; y2:140;}
line {x1:-156; y1:40; x2:-171; y2:140;}
}
}
@@ -62,6 +62,18 @@
}
}
}
@pin memDirect inOut {
@tooltip "pin za izravno spajanje na RAM"
@connection optional("COMDEL se ne može stvoriti. FRISC nije spojen na sabirnicu")
@display {
pin {
x: 100; y: 42; w: 16; h:16;
type: "in";
orientation: "right";
}
}
}
}
@component Memorija memory {
@@ -181,6 +193,29 @@
}
}
}
@pin memDirect inOut {
@tooltip "pin za spajanje na procesor"
@connection optional("COMDEL se ne može stvoriti. Memorija nije spojena na sabirnicu")
@display {
/*
pin {
x: 100; y: 25;
fillColor: blue;
lineColor: red;
fillColorConnected: white;
lineColorConnected: black;
side: right;
size: 20;
}
*/
pin {
x: -16; y: 20; w: 16; h:16;
type: "out";
orientation: "left";
}
}
}
}
@component DMA {
@@ -305,6 +340,13 @@
}
}
@bus directRam automatic {
@wires {
INT
}
}
@connection (FRISC.glavniPin, glavnaSabirnica) {
@wires{ADR, DATA, READ, WRITE, SIZE, WAIT, INT0, INT1, INT2, INT3, IACK, 1, null}
}
@@ -331,4 +373,9 @@
@connection (DMA.glavniPin, PIOSabirnica, FRISC.glavniPin) {
@wires{PIO_DATA, READY, STROBE}
@wires{PIO_DATA, READY, STROBE}
}
@connection (FRISC.memDirect, directRam, Memorija.memDirect) {
@wires{INT}
@wires{INT}
}
@@ -0,0 +1,34 @@
@source "/home/bbr/Documents/Personal/FER/schema_editor/examples/simplified FRISC model/frisc_library.csl"
@schema {
@instance memorija Memorija {
@position (-12, 68)
@attribute sinkroniziran false
@attribute brzina 1
@attribute kapacitet 65536
@attribute size 8
@attribute pocetnaAdresa 0
}
@instance procesor FRISC {
@position (-206, -76)
@attribute _memory memorija
}
@instance directRam directRam {
@position (0, 0)
@size 0
}
@instance glavnaSabirnica glavnaSabirnica {
@position (-222, 130)
@size 50
}
@connection (memorija.memDirect, directRam, procesor.memDirect) {
}
@connection (memorija.glavniPin, glavnaSabirnica) {
}
@connection (procesor.glavniPin, glavnaSabirnica) {
}
}