Skip to content

Invalid Condition in BH controller #45

@Arash1381-y

Description

@Arash1381-y

This section of code seems weird to me: (from bh_controller)

      if (!request_found) {
        // 2.2.1    We first check the priority buffer to prioritize e.g., maintenance requests
        if (m_priority_buffer.size() != 0) {
          req_buffer = &m_priority_buffer;
          req_it = m_priority_buffer.begin();
          req_it->command = m_dram->get_preq_command(req_it->final_command, req_it->addr_vec);
          
          request_found = m_dram->check_ready(req_it->command, req_it->addr_vec);
          if (!request_found & m_priority_buffer.size() != 0) {
            return false;
          }

        if (!request_found){
           ...

        }

the last condition is a bitwise operation of the request found boolean and the size of the priority buffer which does not change from the previous condition. what is the reason behind this bitwise operation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions