增加警告

This commit is contained in:
moyan 2024-05-07 16:50:16 +08:00
parent bd1b011046
commit b26a306cb1

2
CPU.py
View File

@ -2,6 +2,7 @@ import queue
from Memory import Memory from Memory import Memory
from error import * from error import *
import pathlib import pathlib
import warnings
import program import program
import importlib import importlib
@ -89,6 +90,7 @@ class Core:
class MultiCoreCPU: class MultiCoreCPU:
def __init__(self, num_cores, registers, dt_memory, cmd_memory_size=-1): def __init__(self, num_cores, registers, dt_memory, cmd_memory_size=-1):
warnings.warn("该类型CPU有BUG")
self.cores = [] self.cores = []
self.programs = queue.Queue(maxsize=num_cores) self.programs = queue.Queue(maxsize=num_cores)