Initial commit
This commit is contained in:
		
							
								
								
									
										21
									
								
								Libs/NanoBlaze/hdl/scratchpad_RTL.vhd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Libs/NanoBlaze/hdl/scratchpad_RTL.vhd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| ARCHITECTURE RTL OF scratchpad IS | ||||
|  | ||||
|   subtype memoryWordType is signed(dataOut'range); | ||||
|   type memoryArrayType is array (0 to 2**addr'length-1) of memoryWordType; | ||||
|  | ||||
|   signal memoryArray : memoryArrayType; | ||||
|  | ||||
| BEGIN | ||||
|  | ||||
|   process (clock) | ||||
|   begin | ||||
|     if rising_edge(clock) then | ||||
|       if write = '1' then | ||||
|         memoryArray(to_integer(addr)) <= dataIn; | ||||
|       end if; | ||||
|     end if; | ||||
|   end process; | ||||
|  | ||||
|   dataOut <= memoryArray(to_integer(addr)); | ||||
|  | ||||
| END ARCHITECTURE RTL; | ||||
		Reference in New Issue
	
	Block a user