From 42e9569176360b5e1881d317c74ce8522a2af6d1 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 20 Jan 2026 13:55:21 +0100 Subject: Derniers cours du S3 --- .../1- Repr\303\251sentation de l'information.md" | 10 +- .../2- Programmation en ASM Mips.md | 24 +- .../architecture des ordinateurs/td/25-11-26.md | 4 + .../architecture des ordinateurs/td/25-12-10.md | 51 ++ .../architecture des ordinateurs/td/25-12-17.md | 95 ++++ .../tme/tme10/TP10_CheminDonneesMarep.circ | 567 +++++++++++++++++++++ .../tme/tme11/pgcd_ne_fonctionnant_pas.circ | 344 +++++++++++++ 7 files changed, 1078 insertions(+), 17 deletions(-) create mode 100644 semestre 3/architecture des ordinateurs/td/25-12-10.md create mode 100644 semestre 3/architecture des ordinateurs/td/25-12-17.md create mode 100644 semestre 3/architecture des ordinateurs/tme/tme10/TP10_CheminDonneesMarep.circ create mode 100644 semestre 3/architecture des ordinateurs/tme/tme11/pgcd_ne_fonctionnant_pas.circ (limited to 'semestre 3/architecture des ordinateurs') diff --git "a/semestre 3/architecture des ordinateurs/1- Repr\303\251sentation de l'information.md" "b/semestre 3/architecture des ordinateurs/1- Repr\303\251sentation de l'information.md" index 6d6d266..bfab1c4 100644 --- "a/semestre 3/architecture des ordinateurs/1- Repr\303\251sentation de l'information.md" +++ "b/semestre 3/architecture des ordinateurs/1- Repr\303\251sentation de l'information.md" @@ -105,11 +105,11 @@ Toute fonction booléenne peut être décrite par une composition des fonctions Soit $A$ un mot binaire de $n$ bits avec la famille $(a_i)_{i\in[0,n-1]}$ qui forme les bits de $A$. Si $p > n-1$, on a que $[p,n-1] = \varnothing$ par abus de langage -$B = A << p$ tel que +$B = A \ll p$ tel que |> $\forall i\in[0,p-1], b_i = 0$ |> $\forall i\in[p,n-1], b_i = a_{i-p}$ -$B = A >> p$ tel que +$B = A \gg p$ tel que |> $\forall i\in[0,p-1], b_i = a_{i+p}$ |> $\forall i\in[p,n-1], b_i = 0$ @@ -119,7 +119,7 @@ $B = A >> p$ tel que > Si $A = 0101$ et qu'on souhaite avoir $10$, on fait $m = 0110$ > |> $A+m = 0100$ > Puis on décale de 1 pour supprimer la valeur inutile -> |> $A >> 1 = 0010$ +> |> $A \gg 1 = 0010$ > [!warning] Comment faire un bon mask ? > Toujours ne mettre que des 1 là où on veut garder des valeurs, sinon on risque de perdre des infos ! @@ -254,8 +254,8 @@ Attention à l'overflow ! |> la retenu est ignorée quand on dépasse -> est de l'arithmétique modulaire sur $2^n$ Décaler à gauche de $n$ revient à multiplier par la base $B^n$ -|> $(a_{p-1}\ldots a_0)_b\times 2^n = (a_{p-1}\ldots a_0)_b << n = (a_{p-1}\ldots a_0\underbrace{0\ldots0}_n)_b$ -|> $(a_{p-1}\ldots a_0)_b/2^n = (a_{p-1}\ldots a_0)_b >> n = (a_{p-1}\ldots a_{n})$ +|> $(a_{p-1}\ldots a_0)_b\times 2^n = (a_{p-1}\ldots a_0)_b \ll n = (a_{p-1}\ldots a_0\underbrace{0\ldots0}_n)_b$ +|> $(a_{p-1}\ldots a_0)_b/2^n = (a_{p-1}\ldots a_0)_b \gg n = (a_{p-1}\ldots a_{n})$ ## Entiers relatifs On les appelle les nombre entiers signés diff --git a/semestre 3/architecture des ordinateurs/2- Programmation en ASM Mips.md b/semestre 3/architecture des ordinateurs/2- Programmation en ASM Mips.md index edc5cd3..568a612 100644 --- a/semestre 3/architecture des ordinateurs/2- Programmation en ASM Mips.md +++ b/semestre 3/architecture des ordinateurs/2- Programmation en ASM Mips.md @@ -395,22 +395,22 @@ int main(){ ```asm .text # prologue -addiu $29, $29, -12 # car on stock 3 mots + addiu $29, $29, -12 # car on stock 3 mots # initialisation des variables -ori $8, $0, 1 -sw $8, 0($29) -ori $8, $0, 2 -sw $8, 4($29) + ori $8, $0, 1 + sw $8, 0($29) + ori $8, $0, 2 + sw $8, 4($29) # corps du main -lw $8, 0($29) -lw $9, 4($29) -addu $8, $8, $9 -sw $9, 8($29) + lw $8, 0($29) + lw $9, 4($29) + addu $8, $8, $9 + sw $9, 8($29) # épilogue -addiu $29, $29, 12 + addiu $29, $29, 12 # exit -ori $2, $0, 10 -syscall + ori $2, $0, 10 + syscall ``` ## Fonction Pour arriver à une fonction, on utilise `jal label` diff --git a/semestre 3/architecture des ordinateurs/td/25-11-26.md b/semestre 3/architecture des ordinateurs/td/25-11-26.md index e72f90a..47555b1 100644 --- a/semestre 3/architecture des ordinateurs/td/25-11-26.md +++ b/semestre 3/architecture des ordinateurs/td/25-11-26.md @@ -73,6 +73,10 @@ $(\bar a.b.c)+(a.\bar b.\bar c)+(a.b.\bar c)+(a.b.c)$ | 1 | 1 | 0 | 0 | 1 | $s=(\bar u_1.\bar u_2.c_{in})+(\bar u_1.u_2.\bar c_{in})+(u_1.\bar u_2.\bar c_{in})+(u_1.u_2.c_{in})=u_1\oplus u_2\oplus c_{in}$ où $\oplus$ est $\mathrm{xor}$ (à refaire) $c_{out}=(\bar u_1.u_2.c_{in})+(u_1.\bar u_2.c_{in})+(u_1.u_2.c_{in})+(u_1.u_2.\bar c_{in})=a.b+a.c_{in}+b.c_{in}=c_{in}.(a\oplus b)+a.b$ (à refaire) + +$s = (\bar a . \bar b . c)+(\bar a.b.\bar c)+(a.\bar b.\bar c)+(a.b.c)$ +$s = (\bar a . (\bar b + (\bar a.b.\bar c)) . c + (\bar a.b.\bar c))$ + | $i_3$ | $i_2$ | $i_1$ | $i_0$ | $a$ | $b$ | $c$ | $d$ | $e$ | $f$ | $g$ | | ----- | ----- | ----- | ----- | --- | --- | --- | --- | --- | --- | --- | | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | | diff --git a/semestre 3/architecture des ordinateurs/td/25-12-10.md b/semestre 3/architecture des ordinateurs/td/25-12-10.md new file mode 100644 index 0000000..26df476 --- /dev/null +++ b/semestre 3/architecture des ordinateurs/td/25-12-10.md @@ -0,0 +1,51 @@ +--- +tags: + - sorbonne + - informatique + - architecture-des-ordinateurs + - td +semestre: 3 +--- +Un transfert est le déplacement d'une donnée lors d'un cycle + +`LO <- HI or 0` + +`r6 <- r4 or 0` + +`AD <- PC + AD` + +``` +AD <- r[20] +r[8] <- AD + r[18] +``` + +``` +AD <- r[8] +AD <- m[AD] +``` + +``` +IR <- m[PC] +PC <- PC + 4 +AD <- r[5] or 0 +r[3] <- r[7] + AD +``` + +``` +IR <- m[PC] +PC <- PC + 4 +AD <- r[8] + 4 +DT <- m[AD] +r[4] <- DT or 0 +``` + +``` +IR <- m[PC] +PC <- PC + 4 +AD <- r[6] or 0 +m[AD] <- r[9] or 0 +``` + +1. `add $9, $6, $8` +2. `sw $9, 12($10)` +3. `jalr $9, $6` diff --git a/semestre 3/architecture des ordinateurs/td/25-12-17.md b/semestre 3/architecture des ordinateurs/td/25-12-17.md new file mode 100644 index 0000000..f2db8c5 --- /dev/null +++ b/semestre 3/architecture des ordinateurs/td/25-12-17.md @@ -0,0 +1,95 @@ +--- +tags: + - informatique + - sorbonne + - td + - architecture-des-ordinateurs +Semestre: 3 +--- +4 états -> 2 bits +4 + 3 = 7 transitions +|> 0 -> 1, 1 -> 2, 2 -> 3, 3 -> 0, 1 -> 0, 2 -> 0, 0 -> 0 + +RST = reset + +$F_1 = \overline{\text{RST}} . (c_1 \oplus c_2)$ +$F_0 = \overline{\text{RST}} . \bar c_0$ + +```mermaid +flowchart LR + A-- 1 ---A + A-- 0 ---B + B-- 0 ---B + B-- 1 ---C + C-- 1 ---A + C-- 0 ---D + D-- 0 ---B + D-- 1 ---E + E-- 0,1 ---E +``` + +```mermaid +flowchart LR + A-- 0 ---B + B-- 1 ---C + C-- 0 ---D + D-- 1 ---E +``` + +5 états -> 3 bits +4 transitions + +| États | $C_2$ | $C_1$ | $C_0$ | +| ----- | ----- | ----- | ----- | +| A | 0 | 0 | 0 | +| B | 0 | 0 | 1 | +| C | 0 | 1 | 0 | +| D | 0 | 1 | 1 | +| E | 1 | 0 | 0 | + +ext_A = ext_B = ext_C +WE_A = WE_B = WE_C +ext_D = 0 + +ADD = 0 +1. `RA,RB,RC` -> ext_{A,B,C}+WE_{A,B,C} +2. `RD = RA+RB` -> OP_A+OP_B + ADD + WE_D +3. `RD = RD + RC` + +5 états -> 3 bits +6 transitions + +init = chargement dans les registres +s0 = comparaison +s1 = a < b -> a = a, b = b-a +s2 = a > b -> a = a-b, b = a +end = a == b -> met le résultat dans le registre + +| États | Valeur | +| ----- | ------ | +| init | 0 | +| $S_0$ | 1 | +| $S_1$ | 10 | +| $S_2$ | 11 | +| end | 100 | + +| $C_2$ | $C_1$ | $C_0$ | $a>b$ | $a=b$ | $F_2$ | $F_1$ | $F_0$ | +| ----- | ----- | ----- | ----- | ----- | ----- | ----- | ----- | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | +| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | +| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | +| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | +| 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | +| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | +| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | +| 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | +| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | +| 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | +| 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | +| 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | +| 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | +| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | +| 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | +$F_0 = \overline{S_0.((a + + This file is intended to be loaded by Logisim-evolution v4.0.0(https://github.com/logisim-evolution/). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/semestre 3/architecture des ordinateurs/tme/tme11/pgcd_ne_fonctionnant_pas.circ b/semestre 3/architecture des ordinateurs/tme/tme11/pgcd_ne_fonctionnant_pas.circ new file mode 100644 index 0000000..70598c7 --- /dev/null +++ b/semestre 3/architecture des ordinateurs/tme/tme11/pgcd_ne_fonctionnant_pas.circ @@ -0,0 +1,344 @@ + + + This file is intended to be loaded by Logisim-evolution v4.0.0(https://github.com/logisim-evolution/). + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3