| // SPDX-FileCopyrightText: 2020 Efabless Corporation |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // SPDX-License-Identifier: Apache-2.0 |
| `timescale 1ns / 1ps |
| |
| //,,,,,,,,,,,,,,.,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,...,.,..,,,,..,..,,...............,...................................................................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.,.,...,,,.,,,..,,,,........,.....,........,......................................................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,.,,,,,,,,,,,,.......,,,....,,,,..,,..,,....................................................................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.,.,,...,,,.................,......................................................... |
| //,,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,.,,,,,,,,.,..,...,,,,...,,.,...,.......,...........................,.................................................. |
| //.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,....,..,...,.....,,,,,.......,.............,.........,......................................................... |
| //,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,,.,,,.,.,,,,,,...,,......,,.............,......................,....,.................................................. |
| //,,,,,,,,,,..,,,,,,,,,,,,,,,,,,,,,,,,,,,..,,,,,,.,..,,...,,.,,..........,..........................,................................................... |
| //.,,,,,...,,,,,,,.,,,,,,,.,,,,,,,.,,,,,.,.,,,,,,,,,,.,,,,,,Ismail Emir Yuksel.........,,.......,,,.............................................. |
| //,,,,,,,,.,,...,,,,,,.,,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,.,,,,,.......,..,,,....,.................,,.,.,.................................................. |
| //,,,,,,,,,,,,,..,,,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,.,.,,....,,,*,*,,,,,,,*,.......,,..,.,..,,,.,.,,..,..,..,....................................... |
| //,,,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/#%&&&&%#(#(#/,,,...........,,.,,,,,,,.,,,,.,,..,..,................................... |
| //,,,,,,..,,,,,,,,.,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,*#%&&&@@@@@@@&@&@@&%**,,,.....,,...,.,,,,,,,,.,,,,,,,.,...,...,.............................. |
| //,,,,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/%@@@@@@@&&&&&&&@@@@@&&%,,,,.,...,.,,,,,,,,,,,,,,,,,,,,,,,,,,...,..,.......................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*&@@@&%(((//(((((((((((%@@@@&%,.,,,,,,,,,,,,,,,.,,,,,,,,,,,,,,,,,,............................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*@@@@%(/////////////////***/%@@@@(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.............................. |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@@@@(///////////////////*****/&@@@(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,........................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(@@&#//////(((////////////*****/%@@&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,......................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*@&#/(&&&&%%%#((/////(#%&%%%%%*,(&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,........................ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&%/((((###%%%#(//*/(#%%##(/*,**,#&#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,...................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&(//(#####%%#((//*/(#%%###%%*,,,#&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,.....,................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&//////((((((/(//***/((((///***,%%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.,....................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#//////////(##//(//,,*,#(///***,,,(,/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,......................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#//(/////(##(#&&&&%&&%#((#(//*,,,,(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.....,.................. |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*(#%(///(#&%%########((##%#(**,**(((*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,....................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(%##((#%%&%(((##(((/(#%%#(*////%*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*%%#####(((##%%%#//**/(#/(#(((#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,....................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(&%%%%%##((#%%%#((((###%###%(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#&&&%%%%%%%%&&%%%%%##%%%%%/,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,,,,................ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/&&&&&%%&&&&&&%%%%%%%&%%/,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,.,................ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*(#%&&&&&&&&%%%%%&%%#(/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,.,,................ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(((((##%&&&%%%#(*******,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,.,.................... |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*(((((((((###((/**********&&#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...,.,...,............ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&&@&&(((((((((((((((/***//****/%&@&@&&&#*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,................ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*&&@@@@@@@@&((((((((((((((/////****/%&&@&&&@@@&&&&&&&%(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,............. |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/&&&&&@@@&@@@@@@@@@@%(((((((((((((((///((#&&&&@@&&&@@@&&&&&&&&&&&&&%(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,..,............. |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*%&&&&&&&@&@&@&@@@&@@@@@@@@@@&&((((((((((((#&&&&&@&&&@&&&&&&&&&&&&&&&&&&&&&%%*,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,............ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,,*(&&&&&&&@&&&&&@&@&@@@&&@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@&&@&&&&&&&&&&&&&@@&&&&&&&&&%%,,,,,,,,,,,,,,,,,,,,,,,,,,.,,............ |
| //,,,,,,,,,,,,,,,,,,,,,,,,,%&&&&&&&&&&&&&&&&&&&&&@&@&&@@@@@@@@@@@@&@@@@@@&&@@@&&@&&&&&&&&&&&@&&&&&&@&&&&&&&%&&%%*,,,,,,,,,,,,,,,,,,,,,,,,,.,............ |
| //,,,,,,,,,,,,,,,,,,,,,,,,%&&&&&&&&&&&&&&&&&@@&@&&&&&&&&&@&&&@@@@@@@&&&@&&&&@&&&&&&&@&&&&&@&&&&&&&&&&&&&%&%&&&%%&#,,,,,,,,,,,,,,,,,,,,,,,............... |
| //,,,,,,,,,,,,,,,,,,,,,,*%&&&&&&&&&&&&&&&&&&&&&&&&&@&@&&&&@&@&&@@@@@&&@@&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&@&%%%&%,,,,,,,,,,,,,,,,,,,,,,,.............. |
| //,,,,,,,,,,,,,,,,,,,,,*%&&&&&&&&&&&&&@&&&@&&&&&&&&@@&&&&&&&&@&&&&&&@&&@&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&%&%&&&&%%%&&%,,,,,,,,,,,,,,,,,,,,,.,,............ |
| //,,,,,,,,,,,,,,,,,,,,*%&&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&%%@&&&&&%&&&%,,,,,,,,,,,,,,,,,,,,,,............. |
| //,,,,,,,,,,,,,,,,,****&&&&@&&@@@&&&&&&&&&&&&&&@&&&&&&@&&&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&%%%&@@&%&&&@&&&%,,,,,,,,,,,,,,,,,,,,,............. |
| //,,,,,,,,,,,,,,,,,,*,/&&&&&&&&@@@@&&&&&&&&@@&&&&&&&&&&&@&&&&&&&&&&&&@&&@&&@&&&&@&&&&@&&&&&&&&&&&&&&%%%%%@&&@%&&&&&&&&(,,,,,,,,,,,,,,,,,,,,............. |
| //,,,,,,,,,,,,,,,,****#%&&&@@@@@@&@@&&&&&&&&@@&@@&@&&@&@&&&&&&@&&&&@&&@@&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%%&&@&&&&&&@&&&@&%/,,,,,,,,,,,,,,,,,,,.,........... |
| //,,,,,,,,,,,,*,,**,,*%%&&&&@@@@@&@@&&&&&&&@@&&&&@&&&&&&&&@&&&&&&&@@@&&&&@&&@&&&&&&&&&&&&&&&&&&&&&&%%%%&@@@&&&&&&&&@@&&%/,,,,,,,,,,,,,,,,,,,............ |
| //.,,,,,,,,,,,,,,,****%&&&@&@@@@@@@@@&&&&&&&&&&&&&&&&&&&&&&&@&&&&&&@@&@&&&&&&&&&&&@&&&&&&&&&&&&&&%%%%%&&@@&&&&&&&&&@@&&%%*,,,,,,,,,,,,,,,,,,............ |
| //.,,,,,,,,,,,,,,,,***%&&&@&@@@@@&@@@&&&&&&&&&&&&&&@&@&&@&&&&&&@&&&&@@&&&@&&@&&&&@&&&&&&&&&&&&%&%%%%%%@@@@&&&&&&&&@@&&&&%%*,,,,,,,,,,,,,,,,............. |
| //.,,,,,,,,,,,,,,*,**/&&&@&@@@@@@@@@@@&@@&&&&&&&&&&&@@@@@&&&&&&&&&&&&&&&&&&&&@&&&@@&&&&&&&&&&&&&%%%%%%&@@&&&&&&@&&@&&&&&&&%*,,,,,,,,,,,,,,,,,........... |
| //.,,,,,,,,,,,,,,,,*/&&&@@@@@@@@@@@@@@@@@@&&&&@&&&@&@&&&&@&&@&&&&&@&&&@&@&&&@@&&&&&&&&&&&&&&&&&%%%%%%&@@@@&&&@@&&&&&@&&&&&%#,,,,,,,,,,,,,,,,............ |
| //.,,,,,,,,,,,,,,,,*&&&@@@@@@@@@@@@@@@@@&@&&&&&&&&&@&&@&&&@&&&&&&&&&&@&@@&&&&&&&&@&&@&&&&&&&%%&%%%%%%@@@@@@&@@@@@@@@@&&&/,,,,,,,,,,,,,,,,,,.,........... |
| //.,,,,,,,,,,,,,,*,#&&&&&@@@@@@@@@@@@@@@@&&@&&&&@@&@&&&&&&&&&&&&&&&&&&&&&&&&&@@&&&&&&&&&&&&&&%%%%%%%%%@@@@@@@&@@&&/,,,,,,,,,,,,,,,,,,,,,,,,............. |
| //.,,,,,,,,,,,,,,,,*,/&@@@@@@@@@@@@@@@@@@&&&&&&@@&&&&&&&@&&@&&@&&&&&&@&&&&@&@@&&&&&&&&&&&&&&&&%%%%%%*&@@@@&#(//**,,,,,,,,,,,,,,,,,,,,,,,,,,............. |
| //.,,,,,,,,,,,,,*,**,*(((((((((##%&@@&#@@@@&&@&@@&&&@@@&@&&&&@&&&&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&%%%%#**%&%##((//**,,,,,,,,,,,,,,,,,,,,,,,,,,,..,......... |
| //.,,,,,,,,,,,,,**,***(((((((((((###%%*@@@&@&@&&&&&&&@@@&&&&&&&&&&&&&@@@&&&&&&&&&&&&&&&&&&&&&&&%%%%(,*/&%###((/***,,,,,,,,,,,,,,,,,,,,,,,,,,............ |
| //.,,,,,,,,,,,*,**,***((((((((((###%%/*#&&&&@@&&&&&&&@@@&@&&@&&&&&&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&%%%/**,%%%##((///**,,,,,,,,,,,,,,,,,,,,,,,.,,........... |
| //.,,,,,,,,,,,,,,****/(((((((((####%%***&&&&@&@&&&&&&@@&&&&&&&&@&&&&&&&@@@@&&&&&&@&&&&&&&&&&&&&&&%%****(%%###(((//**,,,,,,,,,,,,,,,,,,,,,..,............ |
| //.,,,,,,,,,,*,,*****(((((((((####%%*****&&&&@&&&&&&&@&@&&&&&&&&&&&@&@@&@@&&&&&&&&&&&&&%&&&&&&&&&&#*****%%%#####((/*,,,,,,,,,,,,,,,,,,,,,,.,............ |
| //.,,,,,,,,,,,,,,****((((((((####%%%*****&&&@&&&&&&&&@@&@&&@&&&&&&&&&&&&&&@@&&&&&&@&&&&&&&&&&&&&&&%&**,*%%%######(/*,,,,,,,,,,,,,,,,,,,,,............... |
| // SRAM Researcher, Architecturer, Computer Scientist/Electrical Engineer |
| // Hobbies: Cryptocurrency Enthusiast, DogeCoin |
| // Language: Verilog, C, Turkish, English, Nihongo, BOOTLOADER |
| |
| module bellek_islem_birimi#(parameter GECIKME = 5) |
| ( |
| input clk_g , |
| input rst_g , |
| input [2:0] bellek_buyrugu , |
| input [31:0] islec1_g , |
| input [31:0] islec2_g , |
| input [31:0] anlik_g , |
| input bellek_isaretli , |
| input [2:0] bellek_turu , |
| input bellek_hazir_g , |
| input [31:0] oku_veri_g , |
| input oku_veri_gecerli_g , |
| output reg bitti_c , |
| output reg [31:0] oku_veri_c , |
| output reg [31:0] adres_bib_c , |
| output reg oku_gecerli_bib_c , |
| output reg yaz_gecerli_bib_c , |
| output reg [31:0] yaz_veri_bib_c , |
| output reg [3:0] yaz_veri_bib_maske_c |
| |
| ); |
| localparam FENCE = 3'b001, |
| KAYDET = 3'b010, |
| YUKLE = 3'b100; |
| |
| |
| localparam SB = 3'b001, |
| SH = 3'b010, |
| SW = 3'b100; |
| |
| |
| localparam LW = 5'b00001, |
| LH = 5'b00010, |
| LB = 5'b00100, |
| LHU = 5'b01000, |
| LBU = 5'b10000; |
| |
| localparam BOSTA = 2'b00, |
| BEKLE = 2'b01; |
| |
| |
| reg [4:0] oku_islem_turu = 0 ; |
| reg islem_basladi_mi = 0 ; |
| |
| |
| reg [1:0] bib_durum_r, bib_durum_ns ; |
| |
| always@* begin |
| bib_durum_ns = bib_durum_r ; |
| oku_gecerli_bib_c = 1'b0 ; |
| yaz_gecerli_bib_c = 1'b0 ; |
| yaz_veri_bib_maske_c = 4'b0 ; |
| yaz_veri_bib_c = islec2_g ; |
| |
| adres_bib_c = 0 ; |
| oku_veri_c = 0 ; |
| bitti_c = 0 ; |
| |
| case(bellek_buyrugu) |
| FENCE: begin |
| // HICBIR SEY YAPMA |
| end |
| KAYDET: begin |
| //anlik deger $signed olarak belirtilmemis |
| adres_bib_c = islec1_g + { {20{anlik_g[11]}}, anlik_g[11:0] }; |
| |
| end |
| YUKLE: begin |
| //anlik deger $signed olarak belirtilmemis |
| adres_bib_c = islec1_g + { {20{islec2_g[11]}}, islec2_g[11:0] }; |
| oku_islem_turu = {bellek_turu[0],bellek_turu[1],bellek_turu[2]} << 2*$unsigned(~bellek_isaretli); // kontrol ettim, simdilik problem yok gibi. |
| case(oku_islem_turu) |
| LW: oku_veri_c = oku_veri_g; |
| |
| LH: oku_veri_c = {{16{oku_veri_g[{adres_bib_c[1], 4'b0000} + 15]}}, |
| oku_veri_g[{adres_bib_c[1], 4'b0000} +: 16]}; |
| |
| LHU: oku_veri_c = {{16{1'b0}}, |
| oku_veri_g[{adres_bib_c[1], 4'b0000} +: 16]}; |
| |
| LB: oku_veri_c = {{24{oku_veri_g[{adres_bib_c[1:0], 3'b000} + 7]}}, |
| oku_veri_g[{adres_bib_c[1:0], 3'b000} +:8]}; |
| |
| LBU: oku_veri_c = {{24{1'b0}}, |
| oku_veri_g[{adres_bib_c[1:0], 3'b000} +:8]}; |
| endcase |
| end |
| endcase |
| |
| case(bib_durum_r) |
| BOSTA: begin |
| if (bellek_hazir_g) begin |
| if (bellek_buyrugu == YUKLE) begin |
| bib_durum_ns = BEKLE; |
| oku_gecerli_bib_c = 1'b1; |
| end |
| else begin |
| if (bellek_buyrugu == KAYDET) begin |
| case(bellek_turu) |
| SW: yaz_veri_bib_maske_c = 4'b1111; |
| SH: begin |
| yaz_veri_bib_maske_c = {adres_bib_c[1], adres_bib_c[1], ~adres_bib_c[1], ~adres_bib_c[1]}; |
| yaz_veri_bib_c = islec2_g << (adres_bib_c[1] * 16); |
| end |
| SB: begin |
| yaz_veri_bib_maske_c[adres_bib_c[1:0]] = 1'b1; |
| yaz_veri_bib_c = islec2_g << (adres_bib_c[1:0] * 8); |
| end |
| endcase |
| yaz_gecerli_bib_c = 1'b1; |
| end |
| bitti_c = 1'b1; |
| end |
| end |
| end // BOSTA |
| BEKLE: begin |
| if (oku_veri_gecerli_g) begin |
| bitti_c = 1'b1; |
| bib_durum_ns = BOSTA; |
| end |
| end |
| endcase |
| |
| /* |
| if(bellek_hazir_g) begin |
| islem_basladi_mi = 1'b1; |
| case(bellek_buyrugu) |
| FENCE: begin |
| // HICBIR SEY YAPMA |
| end |
| KAYDET: begin |
| //anlik deger $signed olarak belirtilmemis |
| adres_bib_c = islec1_g + { {20{anlik_g[11]}}, anlik_g[11:0] }; |
| yaz_gecerli_bib_c = 1'b1; |
| case(bellek_turu) |
| SW: yaz_veri_bib_maske_c = 4'b1111; |
| SH: yaz_veri_bib_maske_c = {adres_bib_c[1], adres_bib_c[1], ~adres_bib_c[1], ~adres_bib_c[1]}; |
| SB: yaz_veri_bib_maske_c[adres_bib_c[1:0]] = 1'b1; |
| endcase |
| end |
| YUKLE: begin |
| //anlik deger $signed olarak belirtilmemis |
| adres_bib_c = islec1_g + { {20{islec2_g[11]}}, islec2_g[11:0] }; |
| oku_gecerli_bib_c = 1'b1; |
| oku_islem_turu = {bellek_turu[0],bellek_turu[1],bellek_turu[2]} << 2*$unsigned(~bellek_isaretli); // kontrol ettim, simdilik problem yok gibi. |
| case(oku_islem_turu) |
| LW: oku_veri_c <= oku_veri_g; |
| |
| LH: oku_veri_c <= {{16{oku_veri_g[{adres_bib_c[1], 4'b0000} + 15]}}, |
| oku_veri_g[{adres_bib_c[1], 4'b0000} +: 16]}; |
| |
| LHU: oku_veri_c <= {{16{1'b0}}, |
| oku_veri_g[{adres_bib_c[1], 4'b0000} +: 16]}; |
| |
| LB: oku_veri_c <= {{24{oku_veri_g[{adres_bib_c[1:0], 3'b000} + 7]}}, |
| oku_veri_g[{adres_bib_c[1:0], 3'b000} +:8]}; |
| |
| LBU: oku_veri_c <= {{24{1'b0}}, |
| oku_veri_g[{adres_bib_c[1:0], 3'b000} +:8]}; |
| endcase |
| end |
| endcase |
| end // bellek_hazir_g if |
| if(bellek_buyrugu == KAYDET || (bellek_hazir_g && islem_basladi_mi)) begin |
| bitti_c = 1'b1 ; |
| islem_basladi_mi = 1'b0; |
| end |
| else begin |
| bitti_c = 1'b0 ; |
| end |
| */ |
| |
| end |
| |
| always @(posedge clk_g) begin |
| if (rst_g) |
| bib_durum_r <= BOSTA; |
| else |
| bib_durum_r <= bib_durum_ns; |
| end |
| |
| endmodule |